From afdbafe52c5adf80828120fb4602421731433c68 Mon Sep 17 00:00:00 2001 From: Rei Date: Fri, 29 Dec 2023 09:04:44 +0000 Subject: [PATCH] Vareious corrections so it stores data in firestore correctly. --- src/App.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 8300c12..45b2ebe 100644 --- a/src/App.js +++ b/src/App.js @@ -19,10 +19,6 @@ import 'bootstrap/dist/css/bootstrap.min.css'; import Col from 'react-bootstrap/Col'; import './App.css' -// Import custom contexts - -import { FSContext } from ".//contexts/FSContext.js" - if (!getApps().length) { initializeApp(firebaseConfig); } @@ -66,7 +62,7 @@ const db = getFirestore(getApp()); const submitHandler = async (event) => { event.preventDefault() const incidentsData = { submitter, date, context, selectedOptions } // Use the state variables directly - const col = collection(db, `incidents/${props.incidentId}/incident_logs`) + const col = collection(db, `incidents`) const ref = await addDoc(col, incidentsData) console.log(ref) }