mirror of
https://github.com/urosran/cally.git
synced 2025-07-10 15:17:17 +00:00
Fix fetching events
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user