From 3adab615fe6f84e3ba7ec7ad7ca3f39c67113f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stef=20Oss=C3=A9?= Date: Sun, 10 Mar 2024 20:39:39 +0100 Subject: [PATCH] start login --- frontend/src/hooks/Token.tsx | 2 +- frontend/src/main.tsx | 1 + frontend/src/pages/login/LoginScreen.tsx | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/hooks/Token.tsx b/frontend/src/hooks/Token.tsx index a5da3089..ab8c1048 100644 --- a/frontend/src/hooks/Token.tsx +++ b/frontend/src/hooks/Token.tsx @@ -24,7 +24,7 @@ const useToken = () => { }); } }, [setToken, setCookies, ticket]); - return [token] + return [token]; } export default useToken \ No newline at end of file diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 040cc440..e3fb450c 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -10,6 +10,7 @@ import HomeStudent from "./pages/student/HomeStudent.tsx"; import HomeTeacher from "./pages/teacher/HomeTeacher.tsx"; import 'bulma/css/bulma.min.css'; import './assets/styles/mainpage.css' +import LogoutScreen from "./pages/login/LogoutScreen.tsx"; const router = createBrowserRouter([ { diff --git a/frontend/src/pages/login/LoginScreen.tsx b/frontend/src/pages/login/LoginScreen.tsx index 28591794..c093a3a7 100644 --- a/frontend/src/pages/login/LoginScreen.tsx +++ b/frontend/src/pages/login/LoginScreen.tsx @@ -6,14 +6,14 @@ function LoginScreen(): JSX.Element { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const [token] = useToken() + console.log(token) if (token !== undefined){ - return () + return () } return (

Please log in!

Log in - {token && }
); }