Skip to content

Commit

Permalink
Update src/pages/FormSubmission.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: codecov-ai[bot] <156709835+codecov-ai[bot]@users.noreply.github.com>
  • Loading branch information
drguthals and codecov-ai[bot] authored Nov 14, 2024
1 parent ccfbfb7 commit 9f91f73
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/FormSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ const handleSubmit = (event: Event): void => {

const errors = validateFormData(formData)

try {
if (errors.length > 0) {
displayErrors(errors)
} else {
submitForm(formData)
if (errors.length > 0) {
displayErrors(errors)
} else {
displaySuccessMessage('Form submitted successfully!')
}
displaySuccessMessage('Form submitted successfully!')
}
} catch (error) {

Check failure on line 25 in src/pages/FormSubmission.tsx

View workflow job for this annotation

GitHub Actions / Run Type Checker

',' expected.

Check failure on line 25 in src/pages/FormSubmission.tsx

View workflow job for this annotation

GitHub Actions / Upload Bundle Stats - Production

',' expected.

Check failure on line 25 in src/pages/FormSubmission.tsx

View workflow job for this annotation

GitHub Actions / Upload Bundle Stats - Staging

',' expected.
displayErrorMessage('Failed to submit the form.')
}
Expand Down

0 comments on commit 9f91f73

Please sign in to comment.