diff --git a/apps/web/src/app/main/layout/NavigationMenu.tsx b/apps/web/src/app/main/layout/NavigationMenu.tsx index 3b159e2..1f50140 100755 --- a/apps/web/src/app/main/layout/NavigationMenu.tsx +++ b/apps/web/src/app/main/layout/NavigationMenu.tsx @@ -28,8 +28,11 @@ export const NavigationMenu = () => { } }, [isAuthenticated]); - const selectedKey = - menuItems.find((item) => item.path === pathname)?.key || ""; + const selectedKey = useMemo(() => { + const normalizePath = (path: string): string => path.replace(/\/$/, ""); + return pathname === '/' ? "home" : menuItems.find((item) => normalizePath(pathname) === item.path)?.key || ""; + }, [pathname]); + return (