(event: FormEvent)
| 20 | const [busy, setBusy] = useState(false); |
| 21 | |
| 22 | const submit = async (event: FormEvent) => { |
| 23 | event.preventDefault(); |
| 24 | setBusy(true); |
| 25 | setError(null); |
| 26 | const result = await authClient.signUp.email({ name, email, password }); |
| 27 | if (result.error) { |
| 28 | setBusy(false); |
| 29 | setError(result.error.message ?? "Could not create the admin account."); |
| 30 | return; |
| 31 | } |
| 32 | window.location.href = "/"; |
| 33 | }; |
| 34 | |
| 35 | return ( |
| 36 | <AuthLayout> |
nothing calls this directly
no outgoing calls
no test coverage detected