Make enter key work on auth form.

It was bugging me.
This commit is contained in:
Eli Ribble 2024-08-27 10:53:19 -07:00
parent faca28f802
commit 34ea77f7c3
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ const AuthModal: React.FC<AuthProps> = ({ doLogin }) => {
</Modal.Header>
<Modal.Body>
<Form>
<Form onSubmit={(e) => {e.preventDefault(); doLogin(email, password)}}>
<Form.Group className="mb-3" controlId="formBasicEmail">
<Form.Label>Email address</Form.Label>
<Form.Control type="email" placeholder="Enter email" onChange={e => setEmail(e.target.value)}/>
@ -36,11 +36,11 @@ const AuthModal: React.FC<AuthProps> = ({ doLogin }) => {
<Form.Label>Password</Form.Label>
<Form.Control type="password" placeholder="Password" onChange={e => setPassword(e.target.value)}/>
</Form.Group>
<Button variant="primary" type="submit">Login</Button>
</Form>
</Modal.Body>
<Modal.Footer>
<Button variant="primary" onClick={() => {doLogin(email, password)}}>Login</Button>
</Modal.Footer>
</Modal.Dialog>
</div>