Update LoginPage.tsx

This commit is contained in:
Rami Berman
2022-01-10 11:32:14 +02:00
parent b0f91c6838
commit 323c1e9029

View File

@@ -33,11 +33,16 @@ const LoginPage: React.FC = () => {
} finally {
setIsLoading(false);
}
}
const handleFormOnKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === "Enter") {
onFormSubmit();
}
};
return <div className="centeredForm">
return <div className="centeredForm" onKeyPress={handleFormOnKeyPress}>
{isLoading && <LoadingOverlay/>}
<div className="form-title left-text">Login</div>
<div className="form-input">