@@ -5,7 +5,6 @@ import * as z from 'zod'
5
5
import {
6
6
Eye ,
7
7
EyeOff ,
8
- Github ,
9
8
KeyRound ,
10
9
Loader2 ,
11
10
LockKeyhole ,
@@ -26,6 +25,7 @@ import {
26
25
passwordEncryption ,
27
26
} from '@/app/api/Auth'
28
27
import React , { useState } from 'react'
28
+ import { ToastContainer , toast } from 'react-toastify'
29
29
import {
30
30
generateAuthenticationOption ,
31
31
verifyAuthentication ,
@@ -35,14 +35,13 @@ import { setRefreshToken, setToken } from '@/lib/authSlice'
35
35
import { AxiosResponse } from 'axios'
36
36
import { Button } from '@/components/ui/button'
37
37
import { IVerifyRegistrationObj } from '@/components/profile/interfaces'
38
- import Image from 'next/image '
38
+ import { Icons } from '@/config/svgs/Auth '
39
39
import { Input } from '@/components/ui/input'
40
40
import Link from 'next/link'
41
41
import { apiStatusCodes } from '@/config/CommonConstant'
42
42
import { setProfile } from '@/lib/profileSlice'
43
43
import { signIn } from 'next-auth/react'
44
44
import { startAuthentication } from '@simplewebauthn/browser'
45
- import { toast } from 'sonner'
46
45
import { useDispatch } from 'react-redux'
47
46
import { useForm } from 'react-hook-form'
48
47
import { useRouter } from 'next/navigation'
@@ -287,21 +286,22 @@ export default function SignInViewPage(): React.JSX.Element {
287
286
288
287
return (
289
288
< div className = "relative flex w-full items-center justify-center" >
289
+ < ToastContainer />
290
290
< div className = "bg-card border-border relative z-10 h-full w-full max-w-md overflow-hidden rounded-xl border p-8 shadow-xl transition-transform duration-300" >
291
291
< div className = "mb-6 text-center" >
292
292
< p className = "text-muted-foreground text-sm" >
293
293
Sign in to your account to continue
294
294
</ p >
295
295
</ div >
296
296
297
- < div className = "bg-muted mb-4 flex overflow-hidden rounded-md text-sm font-medium" >
297
+ < div className = "bg-muted mb-4 flex overflow-hidden rounded-md p-1 text-sm font-medium" >
298
298
< Button
299
299
type = "button"
300
300
variant = "ghost"
301
- className = { `flex flex-1 items-center justify-center gap-1 px-4 py-2 ${
301
+ className = { `flex flex-1 items-center justify-center gap-1 px-4 py-2 hover:text-inherit ${
302
302
isPasswordTab
303
- ? 'bg-muted text-muted- foreground'
304
- : 'bg-card text-foreground'
303
+ ? 'bg-card text-foreground hover:bg-background '
304
+ : 'bg-muted text-muted- foreground hover:bg-transparent '
305
305
} `}
306
306
onClick = { ( ) => setIsPasswordTab ( true ) }
307
307
>
@@ -311,10 +311,10 @@ export default function SignInViewPage(): React.JSX.Element {
311
311
< Button
312
312
type = "button"
313
313
variant = "ghost"
314
- className = { `flex flex-1 items-center justify-center gap-1 px-4 py-2 ${
314
+ className = { `flex flex-1 items-center justify-center gap-1 px-4 py-2 hover:text-inherit ${
315
315
! isPasswordTab
316
- ? 'bg-muted text-muted- foreground'
317
- : 'bg-card text-foreground'
316
+ ? 'bg-card text-foreground hover:bg-background '
317
+ : 'bg-muted text-muted- foreground hover:bg-transparent '
318
318
} `}
319
319
onClick = { ( ) => setIsPasswordTab ( false ) }
320
320
>
@@ -389,8 +389,8 @@ export default function SignInViewPage(): React.JSX.Element {
389
389
< Button
390
390
type = "button"
391
391
onClick = { forgotUserPassword }
392
- variant = { 'secondary ' }
393
- className = "text-secondary- foreground cursor-pointer bg-transparent shadow-none hover:bg-transparent hover:underline"
392
+ variant = { 'default ' }
393
+ className = "focus-visible:ring-ring text- foreground w-fit bg-transparent px-2 text-left underline-offset-4 shadow-none hover:bg-transparent hover:underline focus-visible:ring-1 focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 "
394
394
>
395
395
Forgot password?
396
396
</ Button >
@@ -411,24 +411,21 @@ export default function SignInViewPage(): React.JSX.Element {
411
411
< div className = "mt-6 flex flex-col gap-3" >
412
412
< Button
413
413
type = "button"
414
- className = "flex w-full items-center justify-center gap-3 rounded-md border border-[var(--color-gray-300)] bg-[var(--color-white)] py-2 text-sm font-medium text-[var(--color-gray-700)] transition-all duration-200 hover:bg-[var(--color-gray-50)] hover:shadow-sm "
414
+ className = ""
415
415
onClick = { ( ) => route . push ( '#' ) }
416
+ variant = { 'outline' }
416
417
>
417
- < Image
418
- src = "https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg"
419
- alt = "Google"
420
- width = { 15 }
421
- height = { 15 }
422
- />
418
+ < Icons . google className = "mr-2 h-4 w-4" />
423
419
Sign in with Google
424
420
</ Button >
425
421
426
422
< Button
427
423
type = "button"
428
- className = "flex w-full items-center justify-center gap-2 rounded-md bg-[var(--color-black)] text-[var(--color-white)] transition-transform duration-200 hover:-translate-y-0.5 hover:bg-[var(--color-gray-800)] active:scale-95 "
424
+ className = ""
429
425
onClick = { ( ) => route . push ( '#' ) }
426
+ variant = { 'outline' }
430
427
>
431
- < Github className = "h-5 w-5 " />
428
+ < Icons . gitHub className = "mr-2 h-4 w-4 " />
432
429
< span className = "text-sm font-medium" > Sign in with GitHub</ span >
433
430
</ Button >
434
431
</ div >
@@ -439,7 +436,7 @@ export default function SignInViewPage(): React.JSX.Element {
439
436
</ span >
440
437
< Link
441
438
href = "/auth/sign-up"
442
- className = "text-secondary hover:underline"
439
+ className = "text-muted-foreground hover:text-inherit hover:underline"
443
440
>
444
441
Create one
445
442
</ Link >
0 commit comments