Skip to content

Commit f53ac56

Browse files
committed
Add documentation
1 parent 4d1a89e commit f53ac56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frontend/src/app/home/components/landing-page/LandingPage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ const LandingPage = () => {
1818
},
1919
});
2020

21+
// Redirect to dashboard if user authenticates (token is present)
2122
useEffect(() => {
2223
if (token) {
2324
router.push("/");
2425
}
2526
}, [token, router]);
2627

28+
// Trigger OAuth pop up only if user is not authenticated (token is not present)
2729
const handleLogin = () => {
2830
if (token) {
2931
router.push("/");

0 commit comments

Comments
 (0)