fix: layout updates

This commit is contained in:
swve 2023-01-14 01:36:54 +01:00
parent 26e077eed4
commit 88dc060bae
18 changed files with 3479 additions and 328 deletions

View file

@ -34,10 +34,7 @@ const AuthProvider = ({ children }: any) => {
userInfo = await getUserInfo(access_token);
setAuth({ access_token, isAuthenticated: true, userInfo, isLoading });
// if user is authenticated and tries to access login or signup page, redirect to home
if (NON_AUTHENTICATED_ROUTES.includes(router.pathname)) {
router.push("/");
}
} else {
setAuth({ access_token, isAuthenticated: false, userInfo, isLoading });
//router.push("/login");