diff --git a/src/app/NavMain.tsx b/src/app/NavMain.tsx index 6a4220ec..015faa3b 100644 --- a/src/app/NavMain.tsx +++ b/src/app/NavMain.tsx @@ -42,7 +42,7 @@ export function NavMain() { const pathname = usePathname(); const queryParams = useSearchParams(); const { data: company } = useTeam(); - const { toggleSidebar, open } = useSidebar('left'); + const { toggleSidebar, open, isMobile } = useSidebar('left'); const itemsWithActiveState = items.map((item) => ({ ...item, @@ -90,6 +90,10 @@ export function NavMain() { { + if (isMobile && open) toggleSidebar(); + e.stopPropagation(); + }} href={ subItem.queryParams ? Object.entries(subItem.queryParams).reduce(