diff --git a/shell-ui/src/navbar/NavBar.tsx b/shell-ui/src/navbar/NavBar.tsx index e291e359bd..4d86096796 100644 --- a/shell-ui/src/navbar/NavBar.tsx +++ b/shell-ui/src/navbar/NavBar.tsx @@ -131,7 +131,10 @@ export const useNavbarLinksToActions = ( const location = useLocation(); const doesRouteMatch = useCallback( ({ path, exact }: { path: string; exact: boolean }) => { - return matchPath(path + (exact ? '' : '*'), location.pathname); + if (exact) { + return matchPath(path, location.pathname); + } + return matchPath(path + '/*', location.pathname); }, [location], );