Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 6fe2383

Browse files
chore: made login a form to submit on enter in input
1 parent 58a5f9a commit 6fe2383

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/renderer/components/Login/Login.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function Login({ isOpen, closeModal }: LoginProps) {
7878
opacity="0.8 !important"
7979
/>
8080

81-
<ModalContent>
81+
<ModalContent as="form" onSubmit={handleSubmit(onLogin)}>
8282
<ModalHeader>
8383
<Heading as="h5" size="h5">
8484
Add Codiga API Token
@@ -112,11 +112,7 @@ export default function Login({ isOpen, closeModal }: LoginProps) {
112112
<Button variant="secondary" onClick={closeAndReset}>
113113
Cancel
114114
</Button>
115-
<Button
116-
variant="primary"
117-
isLoading={isSubmitting}
118-
onClick={handleSubmit(onLogin)}
119-
>
115+
<Button type="submit" variant="primary" isLoading={isSubmitting}>
120116
<span>Login</span>
121117
</Button>
122118
</ModalFooter>

0 commit comments

Comments
 (0)