1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/core/src/renderer/frames/frame-application-root.injectable.ts
Janne Savolainen 00b85fed0e
Rename feature for clarity
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-03-31 11:01:21 +03:00

32 lines
852 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 {
reactApplicationChildrenInjectionToken,
} from "@k8slens/react-application";
import { computed } from "mobx";
const frameApplicationRootInjectable = getInjectable({
id: "frame-application-root",
instantiate: () => {
const Frame = process.isMainFrame
? require("./root-frame/root-frame").RootFrame
: require("./cluster-frame/cluster-frame").ClusterFrame;
return {
id: "frame-application-root",
Component: Frame,
enabled: computed(() => true),
};
},
causesSideEffects: true,
injectionToken: reactApplicationChildrenInjectionToken,
});
export default frameApplicationRootInjectable;