11'use client' ;
22
33import { signIn } from '@databuddy/auth/client' ;
4- import { EyeIcon , EyeSlashIcon , GithubLogoIcon , SpinnerIcon , SparkleIcon , GoogleLogoIcon } from '@phosphor-icons/react' ;
4+ import {
5+ EyeIcon ,
6+ EyeSlashIcon ,
7+ GithubLogoIcon ,
8+ GoogleLogoIcon ,
9+ SparkleIcon ,
10+ SpinnerIcon ,
11+ } from '@phosphor-icons/react' ;
512import Link from 'next/link' ;
613import { useRouter } from 'next/navigation' ;
714import { Suspense , useEffect , useState } from 'react' ;
@@ -100,7 +107,7 @@ function LoginPage() {
100107
101108 return (
102109 < >
103- < div className = "mb-8 text-center -mt-8 " >
110+ < div className = "-mt-8 mb-8 text-center" >
104111 < h1 className = "font-bold text-2xl text-foreground" > Welcome back</ h1 >
105112 < p className = "mt-2 text-muted-foreground" >
106113 Sign in to your account to continue your journey with Databuddy
@@ -111,7 +118,7 @@ function LoginPage() {
111118 < div className = "-bottom-40 -left-40 pointer-events-none absolute h-80 w-80 rounded-full blur-3xl" />
112119 < div className = "relative z-10" >
113120 < div className = "space-y-6" >
114- < div className = "grid grid-cols-1 gap-3 lg :grid-cols-2 -mt -2" >
121+ < div className = "-mt-2 grid grid-cols-1 gap-3 sm :grid-cols-2" >
115122 < Button
116123 className = "relative flex h-11 w-full cursor-pointer items-center justify-center transition-all duration-200 hover:bg-primary/5"
117124 disabled = { isLoading }
@@ -122,7 +129,7 @@ function LoginPage() {
122129 < GithubLogoIcon className = "mr-2 h-5 w-5" />
123130 < span > Sign in with GitHub</ span >
124131 { lastUsed === 'github' && (
125- < span className = "absolute -top-4 -right-0.5 inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-1.5 py-0.5 font-medium text-primary text-xs" >
132+ < span className = "-top-4 -right-0.5 absolute inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-1.5 py-0.5 font-medium text-primary text-xs" >
126133 Last used
127134 </ span >
128135 ) }
@@ -137,7 +144,7 @@ function LoginPage() {
137144 < GoogleLogoIcon className = "mr-2 h-5 w-5" />
138145 < span > Sign in with Google</ span >
139146 { lastUsed === 'google' && (
140- < span className = "absolute -top-4 -right-0.5 inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-1.5 py-0.5 font-medium text-primary text-xs" >
147+ < span className = "-top-4 -right-0.5 absolute inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-1.5 py-0.5 font-medium text-primary text-xs" >
141148 Last used
142149 </ span >
143150 ) }
@@ -161,7 +168,7 @@ function LoginPage() {
161168 < div className = "relative" >
162169 < Input
163170 autoComplete = "email"
164- className = "h-11 border-none text-foreground bg-input transition-all duration-200 focus:ring-2 focus:ring-primary/20 placeholder:text-muted-foreground/50 "
171+ className = "h-11 border-none bg-input text-foreground transition-all duration-200 placeholder:text-muted-foreground/50 focus:ring-2 focus:ring-primary/20"
165172 id = "email"
166173 name = "email"
167174 onChange = { ( e ) => setEmail ( e . target . value ) }
@@ -197,7 +204,7 @@ function LoginPage() {
197204 < div className = "relative" >
198205 < Input
199206 autoComplete = "current-password"
200- className = "h-11 pr-10 bg-input border-none transition-all duration-200 focus:ring-2 focus:ring-primary/20 placeholder:text-muted-foreground/50 "
207+ className = "h-11 border-none bg-input pr-10 transition-all duration-200 placeholder:text-muted-foreground/50 focus:ring-2 focus:ring-primary/20"
201208 id = "password"
202209 name = "password"
203210 onChange = { ( e ) => setPassword ( e . target . value ) }
@@ -207,7 +214,9 @@ function LoginPage() {
207214 value = { password }
208215 />
209216 < Button
210- aria-label = { showPassword ? 'Hide password' : 'Show password' }
217+ aria-label = {
218+ showPassword ? 'Hide password' : 'Show password'
219+ }
211220 className = "absolute top-0 right-0 h-full px-3 text-muted-foreground hover:text-foreground"
212221 onClick = { ( ) => setShowPassword ( ! showPassword ) }
213222 size = "sm"
0 commit comments