Update code comments

This commit is contained in:
Ray 2023-12-30 08:22:30 +00:00 committed by GitHub
parent 59bbfdaa7d
commit fa0008d22f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -59,11 +59,11 @@ export function MyForm(props) {
};
// Create a function to handle the form submission and add data to Firebase. NOT WORKING
// Create a function to handle the form submission and add data to Firebase.
const submitHandler = async (event) => {
event.preventDefault()
const incidentsData = { submitter, date, context, selectedOptions } // Use the state variables directly
const incidentsData = { submitter, date, context, selectedOptions }
const col = collection(db, `incidents`)
const ref = await addDoc(col, incidentsData)
console.log(ref)