'use client'; import React, { useState } from 'react'; import { GlassCard } from '@/components/GlassCard'; import { loginAdmin } from '@/app/actions/admin'; import { Lock } from 'lucide-react'; export default function AdminLoginPage() { const [error, setError] = useState(null); const [loading, setLoading] = useState(false); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setLoading(true); setError(null); const formData = new FormData(e.currentTarget); try { await loginAdmin(formData); } catch (err: any) { setError(err.message || 'Une erreur est survenue.'); setLoading(false); } }; return (
{/* Logo */}

Administration

Accès restreint aux administrateurs

{error && (

{error}

)}
); }