// Sign In — magic-link primary, OAuth alternatives. Default action is // "Send me a magic link" (no passwords — fits the "no homework" brand). // On submit, transitions to a "Check your inbox" confirmation state. function SignIn() { const [email, setEmail] = React.useState(""); const [submitting, setSubmitting] = React.useState(false); const [sent, setSent] = React.useState(false); const valid = /\S+@\S+\.\S+/.test(email); const handleSubmit = (e) => { e.preventDefault(); if (!valid || submitting) return; setSubmitting(true); setTimeout(() => { setSubmitting(false); setSent(true); }, 700); }; return (
{sent ? ( setSent(false)} /> ) : ( <>
Welcome back

Sign in and keep building.

We'll email you a one-tap link. No passwords to remember, no homework.

setEmail(e.target.value)} />
or continue with
Don't have an invite yet? Request one →
)}
); } // Confirmation: "Check your inbox at you@x.com" with a resend timer + the // option to change email and try again. function SentConfirmation({ email, onChangeEmail }) { const [left, restart] = useResendTimer(30); return (
Check your inbox

Magic link sent.

We just sent a one-tap sign-in link to {email}. Tap it on this device to keep building.

Can't find it? Check your spam folder or wait a few seconds — email is slower than Vibn.
Didn't get it?{" "} {left > 0 ? ( ) : ( )}
Wrong email?
); } ReactDOM.createRoot(document.getElementById("root")).render();