From c77da414f1304821655c706dd826c2222f1b4f14 Mon Sep 17 00:00:00 2001 From: Rei Date: Thu, 28 Dec 2023 14:16:40 +0000 Subject: [PATCH] Add function to display incident's in list form from Firestore Database --- src/App.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 20b760e..3620f6e 100644 --- a/src/App.js +++ b/src/App.js @@ -46,7 +46,7 @@ export function MyForm(props) { }; - // Create a function to handle the form submission and add data to Firebase. + // Create a function to handle the form submission and add data to Firebase. NOT WORKING const submitHandler = async (event) => { event.preventDefault() @@ -143,7 +143,16 @@ export function MyForm(props) { Existing entries

Check here for existing entries:

-

UNDER CONSTRUCTION:

+

Code added, work in progress to add said incidents to Firestore.

+

Incidents in the Database:

+ {incidents.map((incident) => ( +
+

Submitter: {incident.submitter}

+

Date: {incident.date}

+

Context: {incident.context}

+

Selected Options: {incident.selectedOptions.join(", ")}

+
+ ))}