diff --git a/nuxt4-app/app/composables/useSidebarState.ts b/nuxt4-app/app/composables/useSidebarState.ts index 5ebddfe..e12e6eb 100644 --- a/nuxt4-app/app/composables/useSidebarState.ts +++ b/nuxt4-app/app/composables/useSidebarState.ts @@ -8,11 +8,10 @@ * - Estado persistente en cookies * - Sincronización automática entre open/collapsed * - Manejo de responsive (mobile vs desktop) - * - Cierre automático en navegación (solo mobile) + * - DashboardSidebar de Nuxt UI maneja el cierre en navegación */ -import { ref, computed, watch } from 'vue' -import { useRoute } from 'vue-router' +import { ref, computed } from 'vue' // Storage key para las cookies const STORAGE_KEY = 'analytics-dashboard-sidebar' @@ -28,8 +27,6 @@ interface SidebarState { const sidebarState = ref(null) export function useSidebarState() { - const route = useRoute() - // Detectar si estamos en mobile (debe hacerse antes de leer el estado) const isMobile = computed(() => { if (import.meta.server) return false @@ -106,15 +103,6 @@ export function useSidebarState() { collapsed.value = value } - // Auto-cerrar en navegación solo en mobile - if (import.meta.client) { - watch(() => route.fullPath, () => { - if (isMobile.value) { - open.value = false - } - }) - } - return { // Estado open,