Skip to content

Commit

Permalink
fix: Custom Resource Definitions sidebar item should navigate to the …
Browse files Browse the repository at this point in the history
…correct route

Signed-off-by: Sebastian Malton <sebastian@malton.name>
  • Loading branch information
Nokel81 committed May 31, 2023
1 parent 49db31a commit bedd7a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
import crdListRouteInjectable from "./custom-resource-definitions.injectable";

const navigateToCrdListInjectable = getInjectable({
id: "navigate-to-crd-list",
const navigateToCustomResourceDefinitionsInjectable = getInjectable({
id: "navigate-to-custom-resource-definitions",

instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
Expand All @@ -17,4 +17,4 @@ const navigateToCrdListInjectable = getInjectable({
},
});

export default navigateToCrdListInjectable;
export default navigateToCustomResourceDefinitionsInjectable;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar";
import { getInjectable } from "@ogre-tools/injectable";
import customResourceDefinitionsRouteInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/custom-resource-definitions.injectable";
import navigateToCustomResourcesInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/navigate-to-custom-resources.injectable";
import navigateToCustomResourceDefinitionsInjectable from "../../../common/front-end-routing/routes/cluster/custom-resources/navigate-to-custom-resource-definitions.injectable";
import routeIsActiveInjectable from "../../routes/route-is-active.injectable";
import customResourcesSidebarItemInjectable from "./custom-resources-sidebar-item.injectable";

Expand All @@ -17,7 +17,7 @@ const customResourceDefinitionsSidebarItemInjectable = getInjectable({
return {
parentId: customResourcesSidebarItemInjectable.id,
title: "Definitions",
onClick: di.inject(navigateToCustomResourcesInjectable),
onClick: di.inject(navigateToCustomResourceDefinitionsInjectable),
isActive: di.inject(routeIsActiveInjectable, customResourceDefinitionsRoute),
isVisible: customResourceDefinitionsRoute.isEnabled,
orderNumber: 0,
Expand Down

0 comments on commit bedd7a2

Please sign in to comment.