Guest User

Untitled

a guest
Mar 28th, 2021
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. useEffect(() => {
  2. if (mainPageLink === '') {
  3. (async () => {
  4. await appLogin();
  5. const paths: Record<UserRole, string> = {
  6. STUDENT: '/student-main-page',
  7. LECTURER: '/lecturer-main-page',
  8. TRAINING_REPRESENTATIVE: '/training-representative-main-page',
  9. };
  10. const { appRole } = user;
  11. setMainPageLink(paths[appRole]);
  12. })();
  13. }
  14. });
Advertisement
Add Comment
Please, Sign In to add comment