mirror of
https://github.com/urosran/cally.git
synced 2025-11-27 08:54:54 +00:00
All day event package
This commit is contained in:
@ -20,6 +20,7 @@ export const useGetEvents = () => {
|
||||
|
||||
// If family view is active, include family, creator, and attendee events
|
||||
if (isFamilyView) {
|
||||
|
||||
const familyQuery = db.collection("Events").where("familyID", "==", familyId);
|
||||
const creatorQuery = db.collection("Events").where("creatorId", "==", userId);
|
||||
const attendeeQuery = db.collection("Events").where("attendees", "array-contains", userId);
|
||||
@ -83,7 +84,7 @@ export const useGetEvents = () => {
|
||||
const eventColor = profileData?.eventColor || colorMap.pink;
|
||||
|
||||
return {
|
||||
id: event.id || Math.random().toString(36).substr(2, 9), // Generate temp ID if missing
|
||||
id: event.id || Math.random().toString(36).slice(2, 9), // Generate temp ID if missing
|
||||
title: event.title,
|
||||
start: new Date(event.startDate.seconds * 1000),
|
||||
end: new Date(event.endDate.seconds * 1000),
|
||||
@ -96,5 +97,6 @@ export const useGetEvents = () => {
|
||||
},
|
||||
staleTime: Infinity,
|
||||
cacheTime: Infinity,
|
||||
keepPreviousData: true,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user