Unwanted Pop-Ups Removed #20
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
import googleLogo from "../../../assets/images/google-logo.svg";
|
||||
// import titleShape from "../../../assets/images/shape/title-shape.svg";
|
||||
import titleShape from "../../../assets/images/shape/login_straight_underline.svg";
|
||||
@@ -49,14 +49,12 @@ export default function Login() {
|
||||
localStorage.setItem("profile", `${JSON.stringify(loginResult.data.profile)}`);
|
||||
setLoginLoading(true);
|
||||
// userApi.getUserReminders(); //testing
|
||||
setTimeout(() => {
|
||||
toast.success("Login Successfully");
|
||||
setTimeout(() => {
|
||||
navigate("/", { replace: true });
|
||||
setLoginLoading(false);
|
||||
dispatch(updateUserInfo(loginResult.data.profile))
|
||||
}, 2000);
|
||||
} else {
|
||||
// toast.error("Invalid Credential");
|
||||
setLoginError(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {useEffect} from "react";
|
||||
import Home from "../components/Home";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
|
||||
export default function HomePages() {
|
||||
|
||||
@@ -12,9 +12,6 @@ export default function HomePages() {
|
||||
const logOut = () => {
|
||||
localStorage.removeItem("email");
|
||||
localStorage.removeItem('session_token');
|
||||
toast.success("Come Back Soon", {
|
||||
icon: `🙂`,
|
||||
});
|
||||
|
||||
navigate("/login", { replace: true });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user