1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/features/preferences/common/navigate-to-editor-preferences.injectable.ts
Janne Savolainen aaafbdb4fe
Switch to using competition for editor preferences
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-10-20 08:39:35 +03:00

21 lines
801 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 preferencesRouteInjectable from "./preferences-route.injectable";
import { navigateToRouteInjectionToken } from "../../../common/front-end-routing/navigate-to-route-injection-token";
const navigateToEditorPreferencesInjectable = getInjectable({
id: "navigate-to-editor-preferences",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(preferencesRouteInjectable);
return () => navigateToRoute(route, { parameters: { preferenceTabId: "editor" }});
},
});
export default navigateToEditorPreferencesInjectable;