'use client'; import React, { useState } from 'react'; import { GlassCard } from '@/components/GlassCard'; import { loginAdmin } from '@/app/actions/admin'; import { Lock, AlertCircle, ArrowRight } 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

{/* Password Input */}
{/* Error Alert */} {error && (
{error}
)} {/* Submit Button */}
{/* Footer hint */}

Utilisez le mot de passe configuré lors de l'installation

); }