mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove more usages of Singleton
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
257082e699
commit
9fee31a872
18 files changed
+152
-129
No files matched your search
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { UserStore } from "../../common/user-store";
|
||||
import userStoreInjectable from "../../common/user-store/user-store.injectable";
|
||||
import { asLegacyGlobalForExtensionApi } from "../as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api";
|
||||
export interface UserPreferenceExtensionItems {
|
||||
/**
|
||||
* Get the configured kubectl binaries path.
|
||||
@@ -11,6 +12,8 @@ export interface UserPreferenceExtensionItems {
|
||||
getKubectlPath: () => string | undefined;
|
||||
}
|
||||
|
||||
const userStore = asLegacyGlobalForExtensionApi(userStoreInjectable);
|
||||
|
||||
export const Preferences: UserPreferenceExtensionItems = {
|
||||
getKubectlPath: () => UserStore.getInstance().kubectlBinariesPath,
|
||||
getKubectlPath: () => userStore.kubectlBinariesPath,
|
||||
};
|
||||
Reference in new issue
Block a user