Filter out private events

This commit is contained in:
Milan Paunovic
2024-10-20 15:36:19 +02:00
parent 8b37108be3
commit 641bae7e99

View File

@ -53,6 +53,13 @@ export const useGetEvents = () => {
index === self.findIndex(e => e.id === event.id)
);
allEvents = allEvents.filter(event => {
if (event.private) {
return event.creatorId === userId;
}
return true;
});
return await Promise.all(
allEvents.map(async (event) => {
const profileSnapshot = await db