Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
feat: authCountext
Browse files Browse the repository at this point in the history
  • Loading branch information
crimsonf09 committed Jul 13, 2023
1 parent 6e78870 commit 8b6c0df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/context/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ const AuthProvider = ({ children }: { children: ReactNode }) => {
router.push('/register');
}
break;
case '/baan-choosing':
if (!user) {
router.push('/');
} else if (!alreadyRegistered) {
router.push('/register');
}
break;
default:
break;
}
Expand Down

0 comments on commit 8b6c0df

Please sign in to comment.