mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
modified welcome page injectables to allow for the page component to come from an extension
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
1 parent
23cb231c8f
commit
a7121d2cbe
5 files changed
+71
-11
No files matched your search
@@ -4,16 +4,21 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import packageJsonInjectable from "../../../vars/package-json.injectable";
|
||||
import { frontEndRouteInjectionToken } from "../../front-end-route-injection-token";
|
||||
|
||||
const welcomeRouteInjectable = getInjectable({
|
||||
id: "welcome-route",
|
||||
|
||||
instantiate: () => ({
|
||||
path: "/welcome",
|
||||
clusterFrame: false,
|
||||
isEnabled: computed(() => true),
|
||||
}),
|
||||
instantiate: (di) => {
|
||||
const packageJson = di.inject(packageJsonInjectable);
|
||||
|
||||
return {
|
||||
path: packageJson.config.welcomeRoute,
|
||||
clusterFrame: false,
|
||||
isEnabled: computed(() => true),
|
||||
};
|
||||
},
|
||||
|
||||
injectionToken: frontEndRouteInjectionToken,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user