File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
front-end/src/pages/Login Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,28 @@ const Login: React.FC<Props> = () => {
7
7
const { authState, login } = useAuthContext ( ) ;
8
8
9
9
useEffect ( ( ) => {
10
- if ( ! authState . isLoggedin ) {
11
- login ( ) ;
10
+ if ( authState . isLoggedin ) {
11
+ window . location . href = "/" ;
12
12
}
13
- } , [ ] ) ;
14
- return < > </ > ;
13
+ // eslint-disable-next-line react-hooks/exhaustive-deps
14
+ } , [ authState . isLoggedin ] ) ;
15
+
16
+ return (
17
+ < div className = "flex items-center justify-center h-screen bg-gradient-to-tr from-gray-800 via-gray-900 to-black text-white" >
18
+ < div className = "text-center p-8 bg-gray-800 bg-opacity-90 rounded-xl shadow-2xl border border-gray-700" >
19
+ < h1 className = "text-4xl font-extrabold mb-6 text-gray-100" > Welcome to Team3 Task Reports</ h1 >
20
+ < p className = "text-lg mb-8 text-gray-300" > Streamline your tasks and stay on top of your work.</ p >
21
+ < button
22
+ className = "bg-[#5865F2] hover:bg-[#4752C4] text-white font-semibold py-3 px-8 rounded-md shadow-lg transition-transform transform hover:scale-105"
23
+ onClick = { ( ) => {
24
+ login ( ) ; // Call the login logic
25
+ } }
26
+ >
27
+ Login with Discord
28
+ </ button >
29
+ </ div >
30
+ </ div >
31
+ ) ;
15
32
} ;
16
33
17
34
export default Login ;
You can’t perform that action at this time.
0 commit comments