Fix fetching events

This commit is contained in:
Milan Paunovic
2024-10-06 16:08:35 +02:00
parent 4b07f1f36a
commit b74887cf3c
2 changed files with 11 additions and 2 deletions

View File

@ -41,6 +41,13 @@ export const useCreateEventFromProvider = () => {
await firestore()
.collection("Events")
.add({...eventData, creatorId: currentUser?.uid})
} else {
console.log("ENTER HERE")
const docId = snapshot.docs[0].id;
await firestore()
.collection("Events")
.doc(docId)
.update({...eventData, creatorId: currentUser?.uid});
}
} catch (e) {
console.error(e)