mirror of
https://github.com/urosran/cally.git
synced 2025-07-10 15:17:17 +00:00
- Fixed an issue with missing id when creating events and unable to update after
This commit is contained in:
@ -30,9 +30,10 @@ export const useCreateEvent = () => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const newDoc = firestore().collection('Events').doc();
|
||||
await firestore()
|
||||
.collection("Events")
|
||||
.add({...eventData, creatorId: currentUser?.uid, familyId: profileData?.familyId});
|
||||
.add({...eventData, id: newDoc.id, creatorId: currentUser?.uid, familyId: profileData?.familyId});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
Reference in New Issue
Block a user