We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91f17b2 commit 613af28Copy full SHA for 613af28
frontend/src/pages/MainPage.tsx
@@ -1,6 +1,16 @@
1
+import { useEffect } from "react";
2
import { Header } from "../components/Common/Common";
3
+import { OAUTH_LOGIN_URL, useAuthContext } from "../utils/auth";
4
5
function MainPage() {
6
+ const auth = useAuthContext();
7
+
8
+ useEffect(() => {
9
+ if (!auth.isAuthenticated) {
10
+ window.location.assign(OAUTH_LOGIN_URL);
11
+ }
12
+ }, []);
13
14
return <>
15
<Header
16
title="MetaKGP Maintainers' Dashboard"
0 commit comments