11"use client" ;
2+ import { useState } from "react" ;
23import Link from "next/link" ;
34
45export default function LoginPage ( ) {
5- const handleLogin = ( ) => console . log ( "Standard login triggered" ) ;
6- const handleGithubLogin = ( ) => console . log ( "Github OAuth triggered" ) ;
7- const handleGoogleLogin = ( ) => console . log ( "Google OAuth triggered" ) ;
6+ const [ email , setEmail ] = useState ( "" ) ;
7+ const [ password , setPassword ] = useState ( "" ) ;
8+
9+ const logLoginAttempt = ( method : "standard" | "github" | "google" ) => {
10+ console . log ( "Login attempt" , {
11+ method,
12+ email,
13+ password,
14+ } ) ;
15+ } ;
16+
17+ const handleLogin = ( ) => logLoginAttempt ( "standard" ) ;
18+ const handleGithubLogin = ( ) => logLoginAttempt ( "github" ) ;
19+ const handleGoogleLogin = ( ) => logLoginAttempt ( "google" ) ;
820
921 return (
10- < div className = "flex min-h-screen items-center justify-center bg-white p-4" >
11- < div className = "w-full max-w-md space-y-6 rounded-lg border border-black p-8" >
12- < h1 className = "mb-8 text-center text-4xl" > Login</ h1 >
13- { /* ... Email/Password inputs ... */ }
22+ < div className = "flex min-h-screen items-center justify-center bg-white p-4 text-slate-900" >
23+ < div className = "w-full max-w-md space-y-6 rounded-lg border border-slate-300 bg-white p-8 shadow-lg" >
24+ < h1 className = "mb-8 text-center text-4xl font-semibold text-slate-900" > Login</ h1 >
25+ < div className = "space-y-4" >
26+ < div >
27+ < label htmlFor = "email" className = "mb-1 block text-sm font-medium text-slate-800" >
28+ Email
29+ </ label >
30+ < input
31+ id = "email"
32+ type = "email"
33+ value = { email }
34+ onChange = { ( event ) => setEmail ( event . target . value ) }
35+ className = "w-full rounded border border-slate-300 bg-white px-3 py-2 text-slate-900 placeholder:text-slate-400"
36+ placeholder = "you@example.com"
37+ />
38+ </ div >
39+ < div >
40+ < label htmlFor = "password" className = "mb-1 block text-sm font-medium text-slate-800" >
41+ Password
42+ </ label >
43+ < input
44+ id = "password"
45+ type = "password"
46+ value = { password }
47+ onChange = { ( event ) => setPassword ( event . target . value ) }
48+ className = "w-full rounded border border-slate-300 bg-white px-3 py-2 text-slate-900 placeholder:text-slate-400"
49+ placeholder = "Enter your password"
50+ />
51+ </ div >
52+ </ div >
1453 < button
1554 onClick = { handleLogin }
16- className = "w-full rounded bg-gray -200 py-3 text-lg hover:bg-gray -300"
55+ className = "w-full rounded bg-slate -200 py-3 text-lg font-medium text-slate-900 transition hover:bg-slate -300"
1756 >
1857 Login
1958 </ button >
2059 < div className = "text-right" >
2160 < Link
2261 href = "/forgot-password"
2362 title = "Forgot Password?"
24- className = "text-xs hover:underline"
63+ className = "text-xs text-slate-700 hover:text-slate-900 hover:underline"
2564 >
2665 Forgot Password?
2766 </ Link >
@@ -30,20 +69,20 @@ export default function LoginPage() {
3069 < div className = "space-y-3" >
3170 < button
3271 onClick = { handleGithubLogin }
33- className = "w-full rounded bg-gray -200 py-3 hover:bg-gray -300"
72+ className = "w-full rounded bg-slate -200 py-3 font-medium text-slate-900 transition hover:bg-slate -300"
3473 >
3574 Login with Github
3675 </ button >
3776 < button
3877 onClick = { handleGoogleLogin }
39- className = "w-full rounded bg-gray -200 py-3 hover:bg-gray -300"
78+ className = "w-full rounded bg-slate -200 py-3 font-medium text-slate-900 transition hover:bg-slate -300"
4079 >
4180 Login with Google
4281 </ button >
4382 </ div >
44- < p className = "mt-4 text-center text-sm" >
83+ < p className = "mt-4 text-center text-sm text-slate-700 " >
4584 Don't have an account?{ " " }
46- < Link href = "/signup" className = "font-semibold hover:underline" >
85+ < Link href = "/signup" className = "font-semibold text-slate-900 hover:underline" >
4786 Register
4887 </ Link >
4988 </ p >
0 commit comments