mirror of
https://github.com/urosran/cally.git
synced 2025-11-27 00:44:54 +00:00
Filter out private events
This commit is contained in:
@ -53,6 +53,13 @@ export const useGetEvents = () => {
|
|||||||
index === self.findIndex(e => e.id === event.id)
|
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(
|
return await Promise.all(
|
||||||
allEvents.map(async (event) => {
|
allEvents.map(async (event) => {
|
||||||
const profileSnapshot = await db
|
const profileSnapshot = await db
|
||||||
|
|||||||
Reference in New Issue
Block a user