import React, { useState } from 'react'; import { useAuth } from '../context/AuthContext'; import { User, Lock, ArrowRight } from 'lucide-react'; export default function Login() { const [email, setEmail] = useState('patricia_admin@gmail.com'); const [password, setPassword] = useState('patricia2026@mtz'); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); const { login } = useAuth(); const handleSubmit = (e) => { e.preventDefault(); setError(''); setLoading(true); setTimeout(() => { const res = login(email.trim(), password); if (!res.success) { setError(res.message); setLoading(false); } }, 400); }; return (
ACCESO AL SISTEMA
{error && (