Add resetSidebar() to useSidebar composable and call it on logout to prevent stale sidebar data after re-login. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
399 B
Vue
19 lines
399 B
Vue
<template>
|
|
<div class="flex h-full items-center justify-center">
|
|
<p class="text-neutral-500">{{ $t('auth.logout') }}...</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
definePageMeta({ layout: 'auth' })
|
|
|
|
const auth = useAuthStore()
|
|
const { resetSidebar } = useSidebar()
|
|
|
|
onMounted(async () => {
|
|
await auth.logout()
|
|
resetSidebar()
|
|
await navigateTo('/login')
|
|
})
|
|
</script>
|