91 lines
2.8 KiB
TypeScript
91 lines
2.8 KiB
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Input } from "@/components/ui/input";
|
|
import { Label } from "@/components/ui/label";
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardFooter,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { FaGoogle } from "react-icons/fa";
|
|
|
|
export default function SignInPage() {
|
|
const [email, setEmail] = useState("");
|
|
const [password, setPassword] = useState("");
|
|
|
|
const handleSubmit = (e: React.FormEvent) => {
|
|
e.preventDefault();
|
|
// Handle sign-in logic here
|
|
console.log("Sign in attempted with:", email, password);
|
|
};
|
|
|
|
return (
|
|
<div className='flex items-center justify-center min-h-screen bg-gray-100'>
|
|
<Card className='w-full max-w-md'>
|
|
<CardHeader>
|
|
<CardTitle>Sign In</CardTitle>
|
|
<CardDescription>
|
|
Enter your credentials to access your account
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<form onSubmit={handleSubmit} className='space-y-4'>
|
|
<div className='space-y-2'>
|
|
<Label htmlFor='email'>Email</Label>
|
|
<Input
|
|
id='email'
|
|
type='email'
|
|
placeholder='your@email.com'
|
|
value={email}
|
|
onChange={(e) => setEmail(e.target.value)}
|
|
required
|
|
/>
|
|
</div>
|
|
<div className='space-y-2'>
|
|
<Label htmlFor='password'>Password</Label>
|
|
<Input
|
|
id='password'
|
|
type='password'
|
|
value={password}
|
|
onChange={(e) => setPassword(e.target.value)}
|
|
required
|
|
/>
|
|
</div>
|
|
<Button type='submit' className='w-full'>
|
|
Sign In
|
|
</Button>
|
|
</form>
|
|
</CardContent>
|
|
<CardFooter className='flex flex-col space-y-4'>
|
|
<div className='relative w-full'>
|
|
<div className='absolute inset-0 flex items-center'>
|
|
<span className='w-full border-t' />
|
|
</div>
|
|
<div className='relative flex justify-center text-xs uppercase'>
|
|
<span className='bg-white px-2 text-muted-foreground'>
|
|
Or continue with
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div className='grid grid-cols-2 gap-4'>
|
|
<Button variant='outline' onClick={() => console.log("SSO login")}>
|
|
SSO
|
|
</Button>
|
|
<Button
|
|
variant='outline'
|
|
onClick={() => console.log("Google login")}
|
|
>
|
|
<FaGoogle className='mr-2 h-4 w-4' /> Google
|
|
</Button>
|
|
</div>
|
|
</CardFooter>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|