remove unnecessary function

This commit is contained in:
summersamara 2023-11-22 16:45:43 +01:00
parent 69e4a5c532
commit 8a1b122711

View file

@ -612,17 +612,15 @@ const organizerDomain = computed((): string | undefined => {
return organizer.value?.domain ?? undefined;
});
const filterNonPassedRelatedEvents = (relatedEvents: IEvent[] | undefined) => {
return relatedEvents?.filter((relatedEvent) => {
const nonPassedRelatedEvents = computed((): IEvent[] | undefined => {
let relatedEvents = event.value?.relatedEvents;
return relatedEvents?.filter((relatedEvent: IEvent) => {
const endsOn = relatedEvent.endsOn
? new Date(relatedEvent.endsOn)
: new Date(relatedEvent.beginsOn);
return endsOn > new Date();
});
};
const nonPassedRelatedEvents = computed((): IEvent[] | undefined => {
return filterNonPassedRelatedEvents(event.value?.relatedEvents);
});
useHead({