From d86dd487b1a0e28062c653e0581f6102d5e9f415 Mon Sep 17 00:00:00 2001 From: reiyua Date: Sat, 30 Dec 2023 08:54:24 +0000 Subject: [PATCH] Add popup prompt to confim user submission and to relaod page once user closes popup --- src/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 88fb5c4..884303b 100644 --- a/src/App.js +++ b/src/App.js @@ -67,6 +67,8 @@ export function MyForm(props) { const col = collection(db, `incidents`) const ref = await addDoc(col, incidentsData) console.log(ref) + alert("Form submitted successfully!"); + window.location.reload(); } // Create form for user to imput data @@ -167,7 +169,6 @@ export function MyForm(props) { -

Refresh once submitted to see result added below.

Existing incidents in the database: