From 9f4f30cebe5b4d060732bc7a95d80757d63dbbd8 Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Wed, 21 Aug 2024 13:50:37 +0200 Subject: [PATCH] Fixed issue with calendar today loading --- components/calendar/Calendar.vue | 2 +- pages/i/calendar/[id].vue | 2 +- stores/CalendarStore.ts | 76 ++++++++++++++------------------ 3 files changed, 34 insertions(+), 46 deletions(-) diff --git a/components/calendar/Calendar.vue b/components/calendar/Calendar.vue index 10034a9..c5acd41 100644 --- a/components/calendar/Calendar.vue +++ b/components/calendar/Calendar.vue @@ -8,7 +8,7 @@ import CenturyLayout from './state/centennially/Layout.vue' import DecadeLayout from './state/decennially/Layout.vue' import YearLayout from './state/yearly/Layout.vue' -const { currentConfig, selectedDate, jumpToDate } = useCalendar() +const { currentConfig, jumpToDate, selectedDate } = useCalendar() // const { setCharacters } = useCharacters() diff --git a/pages/i/calendar/[id].vue b/pages/i/calendar/[id].vue index 36e026b..5c3ccc1 100644 --- a/pages/i/calendar/[id].vue +++ b/pages/i/calendar/[id].vue @@ -18,7 +18,7 @@ const route = useRoute() const id = route.params.id const calendarStore = useCalendar() -const { pending: calendarPending } = await useAsyncData('calendar', () => calendarStore.fetchCalendar(Number(id)).then(() => true)) +const { pending: calendarPending } = await useAsyncData('calendar', async () => await calendarStore.fetchCalendar(Number(id)))