// Login.jsx - the sign-in card. function Login({ onSignedIn }) { const [email, setEmail] = React.useState(''); const [password, setPassword] = React.useState(''); const [busy, setBusy] = React.useState(false); const [error, setError] = React.useState(''); // Default on: this drive is used from a small number of known machines, and // retyping a 28-character generated password every day is how passwords end // up on sticky notes. const [remember, setRemember] = React.useState(true); async function submit(e) { e.preventDefault(); setError(''); setBusy(true); try { const res = await api.login(email.trim(), password, remember); onSignedIn(res.email); } catch (err) { setError(err.message); setBusy(false); } } return (