fix : reset sidebar state on logout
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>
This commit is contained in:
@@ -8,9 +8,11 @@
|
||||
definePageMeta({ layout: 'auth' })
|
||||
|
||||
const auth = useAuthStore()
|
||||
const { resetSidebar } = useSidebar()
|
||||
|
||||
onMounted(async () => {
|
||||
await auth.logout()
|
||||
resetSidebar()
|
||||
await navigateTo('/login')
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user