@@ -5,6 +5,18 @@ import { signIn } from '@/app/actions/auth-actions';
5
5
import { useRouter } from 'next/navigation' ;
6
6
import Link from 'next/link' ;
7
7
8
+ import { Button } from '@/components/ui/button' ;
9
+ import {
10
+ Card ,
11
+ CardContent ,
12
+ CardFooter ,
13
+ CardHeader ,
14
+ } from '@/components/ui/card' ;
15
+ import { Input } from '@/components/ui/input' ;
16
+ import { Label } from '@/components/ui/label' ;
17
+
18
+ import { UserIcon } from 'lucide-react' ;
19
+
8
20
export default function SignIn ( ) {
9
21
const formRef = useRef < HTMLFormElement > ( null ) ;
10
22
const router = useRouter ( ) ;
@@ -24,41 +36,73 @@ export default function SignIn() {
24
36
< form
25
37
ref = { formRef }
26
38
action = { handleSignIn }
27
- className = "space-y-4 max-w-md mx-auto "
39
+ className = "min-h-screen flex items-center justify-center bg-[url('@/public/loader.svg?height=400 & width = 400 ')] bg-repeat p-4 "
28
40
>
29
- < div >
30
- < label htmlFor = "username" className = "block text-sm font-medium " >
31
- Username
32
- </ label >
33
- < input
34
- type = "text"
35
- name = "username"
36
- id = "username"
37
- required
38
- className = "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
39
- />
40
- </ div >
41
- < div >
42
- < label htmlFor = "password" className = "block text-sm font-medium " >
43
- Password
44
- </ label >
45
- < input
46
- type = "password"
47
- name = "password"
48
- id = "password"
49
- required
50
- className = "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
51
- />
52
- </ div >
53
- < Link className = " text-indigo-600" href = { '/#' } >
54
- Not a user? Register
55
- </ Link >
56
- < button
57
- type = "submit"
58
- className = "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
59
- >
60
- #
61
- </ button >
41
+ <Card className="w-full max-w-md shadow-lg">
42
+ <CardHeader className="space-y-1 flex flex-col items-center">
43
+ <div className="bg-primary text-primary-foreground p-3 rounded-full">
44
+ <UserIcon className="h-6 w-6" />
45
+ </div>
46
+ <h1 className="text-2xl font-bold"># to your account</h1>
47
+ <p className="text-muted-foreground">
48
+ Enter your credentials to access your account
49
+ </p>
50
+ </CardHeader>
51
+ <CardContent className="space-y-4">
52
+ <div className="space-y-2">
53
+ <Label htmlFor="username">Username</Label>
54
+ <Input
55
+ id="username"
56
+ type="text"
57
+ name="username"
58
+ placeholder="Enter your username"
59
+ required
60
+ />
61
+ </div>
62
+ <div className="space-y-2">
63
+ <Label htmlFor="password">Password</Label>
64
+ <Input
65
+ id="password"
66
+ type="password"
67
+ name="password"
68
+ placeholder="Enter your password"
69
+ required
70
+ />
71
+ </div>
72
+ <Button className="w-full" type="submit">
73
+ #
74
+ </Button>
75
+ </CardContent>
76
+ <CardFooter className="flex flex-col space-y-4">
77
+ {/* <div className="relative w-full">
78
+ <div className="absolute inset-0 flex items-center">
79
+ <span className="w-full border-t" />
80
+ </div>
81
+ <div className="relative flex justify-center text-xs uppercase">
82
+ <span className="bg-background px-2 text-muted-foreground">
83
+ Or continue with
84
+ </span>
85
+ </div>
86
+ </div>
87
+ <div className="flex space-x-2">
88
+ <Button variant="outline" className="w-full">
89
+ Google
90
+ </Button>
91
+ <Button variant="outline" className="w-full">
92
+ GitHub
93
+ </Button>
94
+ </div> */}
95
+ <p className="text-center text-sm text-muted-foreground">
96
+ Not a user?{' '}
97
+ < Link
98
+ href = "/#"
99
+ className = "underline underline-offset-4 hover:text-primary"
100
+ >
101
+ Register here
102
+ </ Link >
103
+ < / p >
104
+ </CardFooter >
105
+ < / C a r d >
62
106
</form >
63
107
) ;
64
108
}
0 commit comments