@@ -24,7 +24,12 @@ interface SignInData {
2424const SignIn = ( ) => {
2525 const [ isLoading , setIsLoading ] = useState ( false ) ;
2626 const navigate = useNavigate ( ) ;
27- const { register, handleSubmit, formState : { errors } , reset } = useForm < SignInData > ( ) ;
27+ const {
28+ register,
29+ handleSubmit,
30+ formState : { errors } ,
31+ reset,
32+ } = useForm < SignInData > ( ) ;
2833
2934 const onSubmit = async ( data : SignInData ) => {
3035 setIsLoading ( true ) ;
@@ -40,7 +45,6 @@ const SignIn = () => {
4045 description : response . data . message || "Login successful" ,
4146 } ) ;
4247
43- // store JWT token in localStorage
4448 if ( response . data . token ) {
4549 localStorage . setItem ( "token" , response . data . token ) ;
4650 }
@@ -50,7 +54,9 @@ const SignIn = () => {
5054 } catch ( error : any ) {
5155 toast ( {
5256 title : "Error" ,
53- description : error . response ?. data ?. message || "Login failed. Please try again." ,
57+ description :
58+ error . response ?. data ?. message ||
59+ "Login failed. Please try again." ,
5460 variant : "destructive" ,
5561 } ) ;
5662 } finally {
@@ -59,19 +65,19 @@ const SignIn = () => {
5965 } ;
6066
6167 return (
62- < div className = "min-h-screen flex items-center justify-center bg-gray-50 px-4 py-8" >
63- < Card className = "w-full max-w-md bg-white shadow-lg rounded-xl " >
68+ < div className = "min-h-screen flex items-center justify-center bg-gradient-to-br from-green-50 via-white to-green-100 px-4 py-8" >
69+ < Card className = "w-full max-w-md bg-white/80 backdrop-blur-md shadow-xl border border-green-100 rounded-2xl p-6 animate-fadeIn " >
6470 < CardHeader className = "space-y-1 text-center" >
65- < CardTitle className = "text-3xl font-bold text-green-600" >
71+ < CardTitle className = "text-4xl font-extrabold text-green-600 tracking-tight " >
6672 PeerCall
6773 </ CardTitle >
6874 < CardDescription className = "text-gray-600 text-base" >
69- Sign in to your account
75+ Sign in to continue to your account
7076 </ CardDescription >
7177 </ CardHeader >
7278
7379 < CardContent >
74- < form onSubmit = { handleSubmit ( onSubmit ) } className = "space-y-4 " >
80+ < form onSubmit = { handleSubmit ( onSubmit ) } className = "space-y-5 " >
7581 < InputField
7682 label = "Email"
7783 id = "email"
@@ -104,13 +110,13 @@ const SignIn = () => {
104110
105111 < Button
106112 type = "submit"
107- className = "w-full bg-green-600 text-white hover:bg-green-700 transition-colors rounded-lg py-3"
113+ className = "w-full bg-green-600 text-white hover:bg-green-700 transition-all duration-300 rounded-lg py-3 font-medium shadow-md hover:shadow-lg "
108114 size = "lg"
109115 disabled = { isLoading }
110116 >
111117 { isLoading ? (
112118 < >
113- < Loader2 className = "mr-2 h-4 w-4 animate-spin" />
119+ < Loader2 className = "mr-2 h-5 w-5 animate-spin" />
114120 Signing in...
115121 </ >
116122 ) : (
@@ -119,20 +125,20 @@ const SignIn = () => {
119125 </ Button >
120126 </ form >
121127
122- < div className = "mt-6 " >
128+ < div className = "mt-8 " >
123129 < div className = "text-center text-sm text-gray-500 mb-3" >
124- Or continue with
130+ — Or continue with —
125131 </ div >
126132 < SocialLogin />
127133 </ div >
128134 </ CardContent >
129135
130- < CardFooter className = "flex flex-col space-y-2" >
131- < div className = "text-sm text-gray-500 text-center" >
132- Don' t have an account?{ " " }
136+ < CardFooter className = "flex flex-col space-y-2 mt-4 " >
137+ < div className = "text-sm text-gray-600 text-center" >
138+ Don’ t have an account?{ " " }
133139 < Link
134140 to = "/signup"
135- className = "text-green-600 hover:underline font-medium transition-colors"
141+ className = "text-green-600 font-medium hover:underline hover:text-green-700 transition-colors"
136142 >
137143 Sign Up
138144 </ Link >
0 commit comments