From f43410239b380218a1550e935758e1107ae2cebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=20Gramn=C3=A6s=20Tjernshaugen?= Date: Thu, 5 Sep 2024 11:56:32 +0200 Subject: [PATCH] Don't reset invoicification form when submitting (#992) 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. --- apps/invoicification/src/app/page.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/invoicification/src/app/page.tsx b/apps/invoicification/src/app/page.tsx index 77763b737..9b1862aef 100644 --- a/apps/invoicification/src/app/page.tsx +++ b/apps/invoicification/src/app/page.tsx @@ -21,7 +21,6 @@ export default function Page() { const dispatch = useSubmitMutation() const onSubmit = (data: FormSchema) => { dispatch.mutate(data) - form.reset() } return (