1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/extensions/main-api/navigation.ts
Sebastian Malton 50562f4eef Convert some non-store Singletons to normal injectables
- ClusterManager
- KubeconfigSyncManager
- LensProxy
- WindowManager

Other work:
- Convert logger to be an injection token, add createChildLogger to
  abstract away the need for logPrefix
- Fix tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-05-04 14:52:11 -04:00

15 lines
541 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import windowManagerInjectable from "../../main/window/manager.injectable";
import { getLegacyGlobalDiForExtensionApi } from "../as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
export function navigate(url: string) {
const di = getLegacyGlobalDiForExtensionApi();
const windowManager = di.inject(windowManagerInjectable);
return windowManager.navigate(url);
}