Fixed Logging In Issue

This commit was merged in pull request #9.
This commit is contained in:
2023-10-22 07:08:04 -07:00
parent eceb3178fd
commit 5e3e17e7c2
7 changed files with 38 additions and 59 deletions
+6 -6
View File
@@ -11,13 +11,13 @@ const AuthRoute = ({ children }) => {
const isAuthenticated = token ? true : false;
if (router.pathname === "/auth/login" && isAuthenticated) {
router.push("/");
}
// if (router.pathname === "/auth/login" && isAuthenticated) {
// router.push("/");
// }
if (!authenticationPages.includes(router.pathname) && !isAuthenticated) {
router.push("/auth/login");
}
// if (!authenticationPages.includes(router.pathname) && !isAuthenticated) {
// router.push("/auth/login");
// }
}, []);
return <>{children}</>;