1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/navigation/navigate.injectable.ts

17 lines
511 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 { LocationDescriptor } from "history";
import { navigate } from "./helpers";
export type Navigate = (desc: LocationDescriptor) => void;
const navigateInjectable = getInjectable({
id: "navigate",
instantiate: (): Navigate => (desc) => navigate(desc),
});
export default navigateInjectable;