Play around with data storage, still not working
This commit is contained in:
parent
75572930f8
commit
e6b8047001
|
@ -52,9 +52,9 @@ export function MyForm(props) {
|
|||
|
||||
const submitHandler = async (event) => {
|
||||
event.preventDefault()
|
||||
const incident = { submitter, date, context, selectedOptions }
|
||||
const col = collection(db, `incidents/`)
|
||||
const ref = await addDoc(col, incident)
|
||||
const incidents = { setSubmitter, setDate, setContext, setSelectedOptions }
|
||||
const col = collection(db, `incidents/${props.incidentId}/incident_logs`)
|
||||
const ref = await addDoc(col, incidents)
|
||||
console.log(ref)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue