initialisation du projet

This commit is contained in:
Emma781227
2026-06-10 23:00:41 +02:00
parent f5a5fa6901
commit 45535e2b21
22 changed files with 3443 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
import { useState } from 'react'
import { Link } from 'react-router-dom'
export default function Connexion() {
const [form, setForm] = useState({ email: '', password: '' })
const handleChange = (e) => setForm({ ...form, [e.target.name]: e.target.value })
const handleSubmit = (e) => {
e.preventDefault()
// TODO: connecter au backend
alert(`Connexion avec ${form.email}`)
}
return (
<div className="min-h-screen bg-green-50 flex items-center justify-center p-4">
<div className="bg-white rounded-2xl shadow-lg w-full max-w-md p-8">
<div className="text-center mb-8">
<h1 className="text-3xl font-bold text-green-800">Thé Tip Top</h1>
<p className="text-gray-500 mt-1">Con
nexion à votre espace</p>
</div>
<form onSubmit={handleSubmit} className="space-y-5">
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Email
</label>
<input
type="email"
name="email"
value={form.email}
onChange={handleChange}
required
placeholder="exemple@email.com"
className="w-full border border-gray-300 rounded-lg px-4 py-2.5 focus:outline-none focus:ring-2 focus:ring-green-500"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Mot de passe
</label>
<input
type="password"
name="password"
value={form.password}
onChange={handleChange}
required
placeholder="••••••••"
className="w-full border border-gray-300 rounded-lg px-4 py-2.5 focus:outline-none focus:ring-2 focus:ring-green-500"
/>
</div>
<button
type="submit"
className="w-full bg-green-700 hover:bg-green-800 text-white font-semibold py-2.5 rounded-lg transition-colors"
>
Se connecter
</button>
</form>
<p className="text-center text-sm text-gray-500 mt-6">
Pas encore de compte ?{' '}
<Link to="/inscription" className="text-green-700 font-medium hover:underline">
S'inscrire
</Link>
</p>
</div>
</div>
)
}