Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- useEffect(() => {
- if (mainPageLink === '') {
- (async () => {
- await appLogin();
- const paths: Record<UserRole, string> = {
- STUDENT: '/student-main-page',
- LECTURER: '/lecturer-main-page',
- TRAINING_REPRESENTATIVE: '/training-representative-main-page',
- };
- const { appRole } = user;
- setMainPageLink(paths[appRole]);
- })();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment