/* global React, Wordmark, Button, Ic, VS */ function LoginScreen({ onLogin }) { const [u, setU] = React.useState(''); const [p, setP] = React.useState(''); const [err, setErr] = React.useState(''); const [busy, setBusy] = React.useState(false); const submit = async (e) => { e.preventDefault(); setErr(''); setBusy(true); try { const data = await VS.login(u.trim(), p); onLogin(data); } catch (ex) { setErr(ex.message || 'Nie udało się zalogować'); } finally { setBusy(false); } }; return (