function AuthScreen() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [error, setError] = useState(""); const [loading, setLoading] = useState(false); const submit = (event) => { event.preventDefault(); setLoading(true); setError(""); API.login({ email, password }) .then((session) => { API.setSession(session); window.location.href = session.redirect; }) .catch(() => setError("Email o contraseña incorrectos.")) .finally(() => setLoading(false)); }; return (
ia
DataVoices Academia

Ingresar

Accedé con tus credenciales a la Academia DataVoices.

{error &&
{error}
} {loading ? "Ingresando..." : "Entrar"}
); } ICONS.login = "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3"; Object.assign(window, { AuthScreen });