11'use client'
22
3+ import Image from 'next/image'
34import { useSearchParams } from 'next/navigation'
45import { useSession , signIn } from 'next-auth/react'
56import { Suspense } from 'react'
@@ -9,7 +10,6 @@ import { Button } from '@/components/ui/button'
910import {
1011 Card ,
1112 CardHeader ,
12- CardTitle ,
1313 CardDescription ,
1414 CardContent ,
1515 CardFooter ,
@@ -48,15 +48,34 @@ export function LoginCard({ authCode }: { authCode?: string | null }) {
4848 }
4949
5050 return (
51- < main className = "container mx-auto flex flex-col items-center relative z-10 " >
52- < div className = "w-full sm:w-1/2 md:w-1/3 " >
51+ < div className = "container mx-auto flex flex-col items-center" >
52+ < div className = "w-full max-w-sm " >
5353 < Suspense >
54- < Card >
55- < CardHeader >
56- < CardTitle className = "mb-2" >
57- { authCode ? 'Authenticate' : 'Login' }
58- </ CardTitle >
59- < CardDescription >
54+ { /* Logo + brand */ }
55+ < div className = "flex flex-col items-center mb-8" >
56+ < div className = "relative mb-4" >
57+ < div
58+ className = "absolute inset-0 rounded-full"
59+ style = { {
60+ boxShadow : '0 0 40px 10px rgba(124, 255, 63, 0.15), 0 0 80px 20px rgba(124, 255, 63, 0.08)' ,
61+ } }
62+ />
63+ < Image
64+ src = "/logo-icon.png"
65+ alt = "Freebuff"
66+ width = { 48 }
67+ height = { 48 }
68+ className = "relative rounded-sm"
69+ />
70+ </ div >
71+ < span className = "text-2xl tracking-widest font-serif text-white" >
72+ freebuff
73+ </ span >
74+ </ div >
75+
76+ < Card className = "border-zinc-800/80 bg-zinc-950/80 backdrop-blur-sm gradient-border-shine" >
77+ < CardHeader className = "text-center" >
78+ < CardDescription className = "text-white text-base" >
6079 { authCode
6180 ? 'Continue to sign in to Freebuff.'
6281 : 'Sign in to get started with Freebuff.' }
@@ -66,41 +85,44 @@ export function LoginCard({ authCode }: { authCode?: string | null }) {
6685 { session ?. user ? (
6786 < >
6887 < CardContent className = "space-y-4" >
69- < div className = "flex items-center space-x-3" >
70- < div className = "relative h-12 w-12 rounded-full overflow-hidden bg-secondary" >
88+ < div className = "flex items-center space-x-3 p-3 rounded-lg bg-zinc-900/60 border border-zinc-800/60 " >
89+ < div className = "relative h-10 w-10 rounded-full overflow-hidden bg-secondary flex-shrink-0 " >
7190 { session . user . image ? (
7291 < img
7392 src = { session . user . image }
7493 alt = { session . user . name || '' }
7594 className = "h-full w-full object-cover"
7695 />
7796 ) : (
78- < div className = "h-full w-full flex items-center justify-center text-lg font-medium" >
97+ < div className = "h-full w-full flex items-center justify-center text-sm font-medium text-acid-matrix " >
7998 { session . user . name ?. charAt ( 0 ) ||
8099 session . user . email ?. charAt ( 0 ) ||
81100 'U' }
82101 </ div >
83102 ) }
84103 </ div >
85- < div className = "flex-1" >
86- < p className = "font-medium" > { session . user . name } </ p >
87- < p className = "text-sm text-muted-foreground" >
104+ < div className = "flex-1 min-w-0 " >
105+ < p className = "font-medium text-white truncate " > { session . user . name } </ p >
106+ < p className = "text-sm text-muted-foreground truncate " >
88107 { session . user . email }
89108 </ p >
90109 </ div >
91110 </ div >
92- < p className = "text-sm text-muted-foreground" >
93- Do you want to use this account or sign in with another?
111+ < p className = "text-sm text-muted-foreground text-center " >
112+ Continue with this account or sign in with another.
94113 </ p >
95114 </ CardContent >
96115 < CardFooter className = "flex flex-col space-y-2" >
97- < Button onClick = { handleContinueAsUser } className = "w-full" >
116+ < Button
117+ onClick = { handleContinueAsUser }
118+ className = "w-full bg-acid-matrix/90 text-black font-medium hover:bg-acid-matrix hover:shadow-[0_0_20px_rgba(124,255,63,0.3)] transition-all duration-300"
119+ >
98120 Continue as { session . user . name || session . user . email }
99121 </ Button >
100122 < Button
101123 variant = "outline"
102124 onClick = { handleUseAnotherAccount }
103- className = "w-full"
125+ className = "w-full border-zinc-700 hover:border-acid-matrix/40 hover:text-acid-matrix transition-all duration-300 "
104126 >
105127 Use another account
106128 </ Button >
@@ -112,6 +134,6 @@ export function LoginCard({ authCode }: { authCode?: string | null }) {
112134 </ Card >
113135 </ Suspense >
114136 </ div >
115- </ main >
137+ </ div >
116138 )
117139}
0 commit comments