import { useState, type FormEvent } from 'react'; import { useAuth } from '../context/AuthContext'; export function SignIn() { const { signIn } = useAuth(); const [error, setError] = useState(''); const [busy, setBusy] = useState(false); async function submit(event: FormEvent) { event.preventDefault(); setBusy(true); setError(''); const form = new FormData(event.currentTarget); try { await signIn(String(form.get('email')), String(form.get('password'))); } catch { setError('Those credentials could not be verified.'); setBusy(false); } } return <>Welcome back

Sign in to FeltDB.

Managed apps exchange credentials for a short-lived, application-scoped actor session.

{error &&

{error}

}

New to this app? Create an account

; }