From b3129c7c7229e653c9ab3b1e987b8fadce42f7aa Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Sun, 7 Apr 2024 21:59:15 +0200 Subject: [PATCH] Moved selected date to localstorage --- src/stores/CalendarStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/CalendarStore.ts b/src/stores/CalendarStore.ts index feec2c5..3f2fea2 100644 --- a/src/stores/CalendarStore.ts +++ b/src/stores/CalendarStore.ts @@ -8,7 +8,7 @@ import { type LeimPeriodShort } from '@/models/Date' import { isDigit, isInt, isSignedInt } from '@/utils/Regex' -import { useUrlSearchParams } from '@vueuse/core' +import { useStorage, useUrlSearchParams } from '@vueuse/core' import { defineStore } from 'pinia' import { computed, ref, type ComputedRef, type Ref } from 'vue' @@ -169,7 +169,7 @@ export const useCalendar = defineStore('calendar', () => { } }) - const selectedDate = ref(currentLeimDate.value) + const selectedDate = useStorage('selected-date', currentLeimDate.value) /** * Check whether the current viewType is active