Skip to content

Commit

Permalink
Don't reset invoicification form when submitting (#992)
Browse files Browse the repository at this point in the history
Bekk representative was complaining that when you click submit on the
form seemingly all the form values disappear, making it seem like an
empty form was submitted. This PR removes the form reset on submit.
Since we redirect on success anyways, it is not necessary to reset the
form when successfull, and if the submit fails it is also IMO better to
keep the values.
  • Loading branch information
jotjern authored Sep 5, 2024
1 parent 1a4136d commit f434102
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion apps/invoicification/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default function Page() {
const dispatch = useSubmitMutation()
const onSubmit = (data: FormSchema) => {
dispatch.mutate(data)
form.reset()
}

return (
Expand Down

0 comments on commit f434102

Please sign in to comment.