diff --git a/components/calendar/CalendarEventDetails.vue b/components/calendar/CalendarEventDetails.vue index 5445968..910068b 100644 --- a/components/calendar/CalendarEventDetails.vue +++ b/components/calendar/CalendarEventDetails.vue @@ -30,9 +30,7 @@ const eventDetails = ref() const emit = defineEmits(["query:close-popover"]) const dateDifference: string = getRelativeString(defaultDate, props.event.startDate) -const dateDuration: string | null = props.event.endDate - ? getRelativeString(props.event.startDate, props.event.endDate, "compact") - : null +const dateDuration = computed(() => props.event.endDate ? getRelativeString(props.event.startDate, props.event.endDate, "compact") : null) function handleJumpToDate(date: RPGDate) { jumpToDate(date) diff --git a/components/calendar/search/lists/EventCallout.vue b/components/calendar/search/lists/EventCallout.vue index 2d3965d..87fb8e4 100644 --- a/components/calendar/search/lists/EventCallout.vue +++ b/components/calendar/search/lists/EventCallout.vue @@ -16,9 +16,7 @@ defineEmits<{ const { getRelativeString, defaultDate, getFormattedDateTitle } = useCalendar() const dateDifference: string = getRelativeString(defaultDate, props.event.startDate) -const dateDuration: string | null = props.event.endDate - ? getRelativeString(props.event.startDate, props.event.endDate, "compact") - : null +const dateDuration = computed(() => props.event.endDate ? getRelativeString(props.event.startDate, props.event.endDate, "compact") : null)