Added attendees

This commit is contained in:
Milan Paunovic
2024-10-20 00:53:09 +02:00
parent 478341cce4
commit d87d67eae5
5 changed files with 120 additions and 37 deletions

View File

@ -11,4 +11,5 @@ export interface EventData {
notes?: string,
reminders?: string[]
id?: string | number,
attendees?: string[]
}

View File

@ -17,6 +17,7 @@ export interface UserProfile {
password: string;
familyId?: string;
uid?: string;
pfp?: string;
googleToken?: string | null;
microsoftToken?: string | null;
appleToken?: string | null;

View File

@ -14,7 +14,8 @@ export const useGetEvents = () => {
queryFn: async () => {
const eventsQuery = firestore()
.collection("Events")
.where("creatorId", "==", user?.uid);
.where("creatorId", "==", user?.uid)
.where("attendees", "array-contains", user?.uid);
if (isFamilyView) {
eventsQuery.where("familyID", "==", profileData?.familyId);