Refactored the store system

This commit is contained in:
Alexis
2024-08-20 09:15:05 +02:00
parent 7244120219
commit e978acfc71
26 changed files with 446 additions and 240 deletions

View File

@@ -25,9 +25,6 @@ watch(user, (n, _o) => {
}
})
const { setCurrentMenu } = useUiStore()
setCurrentMenu([])
const modalOpened = ref<boolean>(false)
</script>
@@ -69,7 +66,7 @@ const modalOpened = ref<boolean>(false)
<UiCard
v-if="calendar"
class="w-full transition-all text-slate-100 bg-slate-900 border-slate-700 hover:bg-slate-700 dark:hover:bg-slate-800 dark:border-slate-900 dark:focus-within:outline-slate-900"
:link="`/i/world/${world.id}/calendar`"
:link="`/i/calendar/${calendar.id}`"
>
<UiCardHeader>
<UiCardTitle>{{ calendar.name }}</UiCardTitle>

View File

@@ -1,20 +0,0 @@
<script lang="ts" setup>
useHead({
title: 'Calendrier'
})
definePageMeta({
middleware: ['auth-guard']
})
const user = useSupabaseUser()
// Redirect user back home when they log out on the page
watch(user, (n, _o) => {
if (!n) {
navigateTo('/')
}
})
</script>
<template>
<Calendar />
</template>