mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: layout updates
This commit is contained in:
parent
26e077eed4
commit
88dc060bae
18 changed files with 3479 additions and 328 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue