Skip to content

Commit

Permalink
Merge pull request #149 from lexicongovernance/trigger-validation-on-…
Browse files Browse the repository at this point in the history
…submit

Fix trigger validation on submit
  • Loading branch information
MartinBenediktBusch authored Feb 9, 2024
2 parents 14ca0bc + a005889 commit 6cff111
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/berlin/src/pages/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function AccountForm({
});

const onSubmit = (value: typeof initialUser) => {
if (user && user.id) {
if (isValid && user && user.id) {
mutateUserData({
userId: user.id,
username: value.username,
Expand Down Expand Up @@ -382,9 +382,7 @@ function AccountForm({
icon={{ src: `/icons/add-${theme}.svg`, alt: 'Add icon' }}
/>
</FlexColumn>
<Button type="submit" disabled={!isValid}>
Submit
</Button>
<Button type="submit">Submit</Button>
</FlexColumn>
</form>
</FlexColumn>
Expand Down

0 comments on commit 6cff111

Please sign in to comment.