1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/common/front-end-routing/routes/cluster/helm/releases/navigate-to-helm-releases.injectable.ts
2022-04-06 10:34:16 -04:00

25 lines
951 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import type { HelmReleasesPathParameters } from "./helm-releases-route.injectable";
import helmReleasesRouteInjectable from "./helm-releases-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
export type NavigateToHelmReleases = (parameters?: HelmReleasesPathParameters) => void;
const navigateToHelmReleasesInjectable = getInjectable({
id: "navigate-to-helm-releases",
instantiate: (di): NavigateToHelmReleases => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(helmReleasesRouteInjectable);
return (parameters) =>
navigateToRoute(route, { parameters });
},
});
export default navigateToHelmReleasesInjectable;