From 1542b8156be4baf6f40f855157b93ae4646a4719 Mon Sep 17 00:00:00 2001 From: Yogesh Date: Wed, 30 Jul 2025 12:18:49 +0530 Subject: [PATCH] close nav manu on mobile after selection --- src/app/NavMain.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(