diff --git a/src/extensions/lens-extension.ts b/src/extensions/lens-extension.ts index ca135a0b39..ab87938f48 100644 --- a/src/extensions/lens-extension.ts +++ b/src/extensions/lens-extension.ts @@ -49,7 +49,7 @@ export class LensExtension { } getPageRoute(baseRoute = "") { - return this.routePrefix + baseRoute; + return this.getPageUrl() + baseRoute; } @action diff --git a/src/renderer/components/cluster-manager/clusters-menu.tsx b/src/renderer/components/cluster-manager/clusters-menu.tsx index 7844399227..bc51799934 100644 --- a/src/renderer/components/cluster-manager/clusters-menu.tsx +++ b/src/renderer/components/cluster-manager/clusters-menu.tsx @@ -5,7 +5,6 @@ import { remote } from "electron" import type { Cluster } from "../../../main/cluster"; import { DragDropContext, Draggable, DraggableProvided, Droppable, DroppableProvided, DropResult } from "react-beautiful-dnd"; import { observer } from "mobx-react"; -import { matchPath } from "react-router"; import { _i18n } from "../../i18n"; import { t, Trans } from "@lingui/macro"; import { userStore } from "../../../common/user-store"; @@ -15,7 +14,7 @@ import { ClusterIcon } from "../cluster-icon"; import { Icon } from "../icon"; import { autobind, cssNames, IClassName } from "../../utils"; import { Badge } from "../badge"; -import { navigate, navigation } from "../../navigation"; +import { isActiveRoute, navigate } from "../../navigation"; import { addClusterURL } from "../+add-cluster"; import { clusterSettingsURL } from "../+cluster-settings"; import { landingURL } from "../+landing-page"; @@ -153,12 +152,11 @@ export class ClustersMenu extends React.Component { const registeredPage = globalPageRegistry.getById(menuItemId); if (!registeredPage) return; const { routePath, exact } = registeredPage; - const isActive = !!matchPath(navigation.location.pathname, { path: routePath, exact }); return ( navigate(url)} /> )