From a9944aa5e02157a34488c12b04d6c2332ae7ef6e Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Fri, 20 Sep 2024 04:49:25 -0400 Subject: [PATCH] fix a bug with the sidebar nav --- src/components/dashboard/sidebar/sidebar-links.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/dashboard/sidebar/sidebar-links.tsx b/src/components/dashboard/sidebar/sidebar-links.tsx index 4d88bd6..039d152 100644 --- a/src/components/dashboard/sidebar/sidebar-links.tsx +++ b/src/components/dashboard/sidebar/sidebar-links.tsx @@ -75,7 +75,10 @@ const Links = (): ReactElement => { index === 0 || (index > 0 && selectedOrganization) ) .map((link: SidebarLink, index: number) => { - const active: boolean = path.startsWith(link.href); + const active: boolean = + index === 0 + ? path === link.href + : path.startsWith(link.href); return (