diff --git a/frontend/src/components/Authentication/Signup.js b/frontend/src/components/Authentication/Signup.js index f137580..b87676d 100644 --- a/frontend/src/components/Authentication/Signup.js +++ b/frontend/src/components/Authentication/Signup.js @@ -5,13 +5,13 @@ import { VStack } from "@chakra-ui/layout"; import { useToast } from "@chakra-ui/toast"; import axios from "axios"; import { useState } from "react"; -import { useHistory } from "react-router"; +import { useNavigate } from "react-router"; const Signup = () => { const [show, setShow] = useState(false); const handleClick = () => setShow(!show); const toast = useToast(); - const history = useHistory(); + const navigate = useNavigate(); const [name, setName] = useState(); const [email, setEmail] = useState(); @@ -70,7 +70,7 @@ const Signup = () => { }); localStorage.setItem("userInfo", JSON.stringify(data)); setPicLoading(false); - history.push("/chats"); + navigate("/chats"); } catch (error) { toast({ title: "Error Occured!",