"use client" import Link from "next/link" import { useState } from "react" import { Button } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Mail, Lock, AlertCircle, CheckCircle } from "lucide-react" export default function RegisterPage() { const [formData, setFormData] = useState({ firstName: "", lastName: "", email: "", password: "", passwordConfirm: "", }) const [loading, setLoading] = useState(false) const [error, setError] = useState("") const [success, setSuccess] = useState(false) const handleChange = (e: React.ChangeEvent) => { const { name, value } = e.target setFormData(prev => ({ ...prev, [name]: value })) } const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setError("") setSuccess(false) setLoading(true) if (formData.password !== formData.passwordConfirm) { setError("Les mots de passe ne correspondent pas") setLoading(false) return } try { // API call would go here console.log("Register attempt:", formData) // Simulate API delay await new Promise(resolve => setTimeout(resolve, 1000)) setSuccess(true) // Redirect to dashboard or login } catch (err) { setError("Une erreur s'est produite lors de l'inscription") } finally { setLoading(false) } } return (
{/* Left side - Illustration */}
🗳️

Rejoignez-nous

Créez un compte pour participer à des élections sécurisées et transparentes

Inscription gratuite

Sécurité maximale

Aucune données

{/* Right side - Form */}

S'inscrire

Créez votre compte E-Voting

{error && (

Erreur

{error}

)} {success && (

Succès

Votre compte a été créé avec succès

)}

Déjà un compte?{" "} Se connecter

) }