Correction Erreur

This commit is contained in:
Kevin 2025-02-17 23:02:26 +01:00
parent e9275f2ece
commit 6fe47eb31f

View File

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