// components/Auth.jsx const { useState: useAuthState } = React; function Auth({ onLogin }) { const [mode, setMode] = useAuthState('login'); const [email, setEmail] = useAuthState(''); const [password, setPassword] = useAuthState(''); const [name, setName] = useAuthState(''); const [error, setError] = useAuthState(''); const [loading, setLoading] = useAuthState(false); async function handleSubmit(e) { e.preventDefault(); setError(''); setLoading(true); try { const user = mode === 'login' ? await DB.login(email, password) : await DB.register(email, password, name || email.split('@')[0]); onLogin(user); } catch (err) { setError(err.message); } finally { setLoading(false); } } const s = authCSS; return (
FIFA World Cup 2026™
Modo local — datos guardados en este navegador.{' '} window.__openSettings && window.__openSettings()}> Conectar Supabase
)}