import { useState, type FormEvent } from 'react'; import { useAuth } from '../context/AuthContext'; export function SignUp() { const { signUp } = 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 signUp({ name: String(form.get('name')), email: String(form.get('email')), password: String(form.get('password')), organization: String(form.get('organization')) }); } catch (error) { setError(error instanceof Error ? error.message : 'We could not create your account. Check the details and try again.'); setBusy(false); } } return <>Create your workspace

Start with durable state.

Your actor, account, and organization are established at the FeltDB boundary.

{error &&

{error}

}

Already have an account? Sign in

; }