1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove usages of legacy global navigate

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-12-22 11:34:09 -05:00
parent 501ce156c0
commit 88a393849b
2 changed files with 3 additions and 11 deletions

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { navigate } from "../../renderer/navigation";
import type { CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
import type { CatalogEntityActionContext } from "../catalog/catalog-entity";
import { CatalogCategory, CatalogEntity, categoryVersion } from "../catalog/catalog-entity";
interface GeneralEntitySpec extends CatalogEntitySpec {
@ -19,8 +19,8 @@ export class GeneralEntity extends CatalogEntity<CatalogEntityMetadata, CatalogE
public readonly apiVersion = "entity.k8slens.dev/v1alpha1";
public readonly kind = "General";
async onRun() {
navigate(this.spec.path);
async onRun(context: CatalogEntityActionContext) {
context.navigate(this.spec.path);
}
}

View File

@ -3,14 +3,6 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { asLegacyGlobalFunctionForExtensionApi } from "../../extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api";
import navigateInjectable from "./navigate.injectable";
export { searchParamsOptions } from "./search-params";
/**
* @deprecated use `di.inject(navigateInjectable)` instead
*/
export const navigate = asLegacyGlobalFunctionForExtensionApi(navigateInjectable);
export * from "./page-param";