diff --git a/ui/src/components/ui/NavBar.vue b/ui/src/components/ui/NavBar.vue index 957b1d5..c305835 100644 --- a/ui/src/components/ui/NavBar.vue +++ b/ui/src/components/ui/NavBar.vue @@ -21,6 +21,15 @@ watch(route, v => (activePath.value = v.path)) // clases dinĂ¡micas p/ mostrar / ocultar barra const sidebarClasses = computed(() => ui.sidebarOpen ? 'translate-x-0' : '-translate-x-full') + +const handleLinkClick = () => { + // Close sidebar if desktopNavbarPersistent is false or if it's mobile view (width < 768px) + // Assuming 768px is the 'md' breakpoint. + if (!ui.desktopNavbarPersistent || window.innerWidth < 768) { + ui.closeSidebar() + } + // Otherwise, (desktopNavbarPersistent is true AND width >= 768px), do nothing to keep sidebar open. +}