Skip to content

Commit

Permalink
go back home button
Browse files Browse the repository at this point in the history
  • Loading branch information
phamthanhhang208 committed Jan 23, 2022
1 parent aeb54d2 commit 0fd1d8d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/src/containers/Chat/WrapperChat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
useQuery,
} from "react-query";
import AuthContext from "../../context/authContext";
import { useParams, useNavigate } from "react-router-dom";
import { useParams } from "react-router-dom";
import Chat from "./Chat";
import { getConversation, deleteMessage } from "../../api/chatApi";
import { getUserChatInfo } from "../../api/userApi";
Expand All @@ -15,7 +15,6 @@ import Spinner from "../../components/spinner/Spinner";
import SocketContext from "../../context/socketContext";

export default function WrapperChat() {
let navigate = useNavigate();
const queryClient = useQueryClient();
const [enabled, setEnabled] = useState(true);
const [chatHistory, setChatHistory] = useState([]);
Expand Down Expand Up @@ -134,7 +133,7 @@ export default function WrapperChat() {
title="500"
subTitle="Sorry, something went wrong."
extra={
<Button type="primary" onClick={() => navigate("/users")}>
<Button type="primary" onClick={() => window.location.reload()}>
Back Home
</Button>
}
Expand Down

0 comments on commit 0fd1d8d

Please sign in to comment.