return ( <form onSubmit=handleSubmit> <input type="email" value=email onChange=e => setEmail(e.target.value) required /> <input type="password" value=password onChange=e => setPassword(e.target.value) required /> error && <div className="error">error</div> <button type="submit">Log in</button> </form> );
const handleSubmit = async (e: React.FormEvent) => e.preventDefault(); setError(''); wepik.com login
if (res.ok) window.location.href = '/dashboard'; else ; return ( <
const res = await fetch('/api/auth/login', method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify( email, password ) ); input type="email" value=email onChange=e =>