From 4cf4ae1a0195f0e0923ee48b428b94447e8f64b0 Mon Sep 17 00:00:00 2001
From: ks129 <45097959+ks129@users.noreply.github.com>
Date: Tue, 19 Jan 2021 14:27:24 +0200
Subject: Add preventDefault to avoid reloading of page

---
 src/pages/FormPage.tsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src/pages/FormPage.tsx')

diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx
index 6c7cad2..1a9b7cf 100644
--- a/src/pages/FormPage.tsx
+++ b/src/pages/FormPage.tsx
@@ -174,6 +174,7 @@ function FormPage(): JSX.Element {
     });
 
     function handleSubmit(event: SyntheticEvent) {
+        event.preventDefault();
         // Client-side required validation
         const invalidFieldIds: string[] = [];
         questionsMap.forEach((prop, id) => {
-- 
cgit v1.2.3

