- Implemented assigning todos

This commit is contained in:
Dejan
2024-10-20 20:45:09 +02:00
parent 206ffd5a88
commit 709b333ee1
6 changed files with 75 additions and 36 deletions

View File

@ -15,10 +15,24 @@ export const useGetFamilyMembers = (excludeSelf?: boolean) => {
.get();
if (excludeSelf) {
return snapshot.docs.map((doc) => doc.data()).filter((doc) => doc.id !== user?.uid) as UserProfile[];
return snapshot.docs.map((doc) => {
let documentData = doc.data();
return {
...documentData,
uid: doc.id
}
}).filter((doc) => doc.id !== user?.uid) as UserProfile[];
}
return snapshot.docs.map((doc) => doc.data()) as UserProfile[];
return snapshot.docs.map((doc) => {
let documentData = doc.data();
return {
...documentData,
uid: doc.id
}
}) as UserProfile[];
}
})
}