remove unnecessary function
This commit is contained in:
parent
69e4a5c532
commit
8a1b122711
|
@ -612,17 +612,15 @@ const organizerDomain = computed((): string | undefined => {
|
||||||
return organizer.value?.domain ?? undefined;
|
return organizer.value?.domain ?? undefined;
|
||||||
});
|
});
|
||||||
|
|
||||||
const filterNonPassedRelatedEvents = (relatedEvents: IEvent[] | undefined) => {
|
const nonPassedRelatedEvents = computed((): IEvent[] | undefined => {
|
||||||
return relatedEvents?.filter((relatedEvent) => {
|
let relatedEvents = event.value?.relatedEvents;
|
||||||
|
|
||||||
|
return relatedEvents?.filter((relatedEvent: IEvent) => {
|
||||||
const endsOn = relatedEvent.endsOn
|
const endsOn = relatedEvent.endsOn
|
||||||
? new Date(relatedEvent.endsOn)
|
? new Date(relatedEvent.endsOn)
|
||||||
: new Date(relatedEvent.beginsOn);
|
: new Date(relatedEvent.beginsOn);
|
||||||
return endsOn > new Date();
|
return endsOn > new Date();
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
const nonPassedRelatedEvents = computed((): IEvent[] | undefined => {
|
|
||||||
return filterNonPassedRelatedEvents(event.value?.relatedEvents);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
|
|
Loading…
Reference in a new issue