From 132a21e113052a6cdb3396e26f963c98a529fdfe Mon Sep 17 00:00:00 2001 From: Riku Rauhala Date: Mon, 2 Dec 2024 12:42:18 +0200 Subject: [PATCH] [Navigation bar] Fix active status for subpaths --- .../frontend/src/components/material/NavigationBar/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/frontend/src/components/material/NavigationBar/index.tsx b/services/frontend/src/components/material/NavigationBar/index.tsx index b0df7772d..9f16cdfab 100644 --- a/services/frontend/src/components/material/NavigationBar/index.tsx +++ b/services/frontend/src/components/material/NavigationBar/index.tsx @@ -19,7 +19,7 @@ export const NavigationBar = () => { const isActivePath = (mainPath: string | undefined, subPaths: (string | undefined)[] = []) => { const allPaths = [mainPath, ...subPaths].filter(Boolean) - return allPaths.some(currentPath => location.pathname === currentPath) + return allPaths.some(currentPath => location.pathname.includes(currentPath)) } const getVisibleNavigationItems = () => {