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

Commit

Permalink
Feature/rkm66 64 baan announcement page (#64)
Browse files Browse the repository at this point in the history
* Revert "feat: Deploy Production Phase 1.2" (#61)

* Revert "Revert "feat: Deploy Production Phase 1.2" (#61)"

This reverts commit bf25588.

* feat: verbose error msg

* feat: baan announce page

* feat: baan announce page

* feat: add announce baan

* fix: edit no baan page

* feat: edit no baan page

* feat: edit auth gard

---------

Co-authored-by: ImSoZRious <[email protected]>
Co-authored-by: Nutthapat Pongtanyavichai <[email protected]>
Co-authored-by: Poonpipob "Leon" Kunlayanathee <[email protected]>
Co-authored-by: boomchanotai <[email protected]>
Co-authored-by: shalluv <[email protected]>
  • Loading branch information
6 people authored Jul 23, 2023
1 parent 2a31536 commit 77aa70b
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 14 deletions.
1 change: 1 addition & 0 deletions public/images/icons8-instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/testAnnounceBaan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 2 additions & 10 deletions src/context/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,16 @@ const AuthProvider = ({ children }: { children: ReactNode }) => {
switch (router.pathname) {
case '/':
if (user) {
if (alreadyRegistered) router.push('/profile');
else router.push('/register');
router.push('/announce-baan');
}
break;
case '/announce-baan':
case '/register':
if (!user) {
router.push('/');
} else if (alreadyRegistered) {
router.push('/profile');
}
break;
case '/wait-baan-selection':
case '/profile':
case '/baan-selection':
if (!user) {
router.push('/');
} else if (!alreadyRegistered) {
router.push('/register');
}
break;
default:
Expand Down
Loading

0 comments on commit 77aa70b

Please sign in to comment.