mirror of
https://github.com/urosran/cally.git
synced 2025-07-14 17:25:46 +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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const newDoc = firestore().collection('Events').doc();
|
||||||
await firestore()
|
await firestore()
|
||||||
.collection("Events")
|
.collection("Events")
|
||||||
.add({...eventData, creatorId: currentUser?.uid, familyId: profileData?.familyId});
|
.add({...eventData, id: newDoc.id, creatorId: currentUser?.uid, familyId: profileData?.familyId});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user