Added loading logic to calendar page

This commit is contained in:
Alexis
2024-05-17 20:50:45 +02:00
parent 5dd06ea3f8
commit 059edd6fc1
3 changed files with 32 additions and 20 deletions

View File

@@ -1,16 +0,0 @@
<script lang="ts" setup>
const route = useRoute()
const worldId = route.params.id
const { months } = storeToRefs(useCalendar())
const { data: res } = await useLazyFetch(`/api/calendars/query?world_id=${worldId}`)
if (res.value?.data?.months) {
months.value = res.value?.data?.months
}
</script>
<template>
<Calendar />
</template>