Play around with data storage, still not working

This commit is contained in:
Ray 2023-12-28 02:26:27 +00:00 committed by GitHub
parent 75572930f8
commit e6b8047001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -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)
}