Moved selected date to localstorage

This commit is contained in:
Alexis
2024-04-07 21:59:15 +02:00
parent ec0ff57a49
commit b3129c7c72

View File

@@ -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<LeimDate>(currentLeimDate.value)
const selectedDate = useStorage('selected-date', currentLeimDate.value)
/**
* Check whether the current viewType is active