From 72907d2583a8e5a26833d1c607f15074bf946f3f Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 1 Mar 2021 22:12:57 +0100 Subject: [PATCH] remain active on child pages of main section (#403) fixing: #402 --- src/PageNav.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PageNav.tsx b/src/PageNav.tsx index 0aaf4644bf..bb76742db5 100644 --- a/src/PageNav.tsx +++ b/src/PageNav.tsx @@ -44,12 +44,15 @@ export const PageNav: React.FunctionComponent = () => { (route) => route.path.substr("/:realm".length) === path ); if (!route || !hasAccess(route.access)) return <>; - const activeItem = history.location.pathname; + //remove "/realm-name" from the start of the path + const activeItem = history.location.pathname.substr(realm.length + 1); return ( {t(title)}