mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Made welcome page configurable (#6232)
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
2555643749
commit
a2d52fa6b8
11 files changed
+211
-23
No files matched your search
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
|
||||
import { matches } from "lodash/fp";
|
||||
import { computed } from "mobx";
|
||||
import currentRouteInjectable from "./current-route.injectable";
|
||||
import { routeSpecificComponentInjectionToken } from "./route-specific-component-injection-token";
|
||||
@@ -24,11 +23,13 @@ const currentRouteComponentInjectable = getInjectable({
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const routeSpecificComponent = routeComponents
|
||||
return routeComponents
|
||||
.get()
|
||||
.find(matches({ route: currentRoute }));
|
||||
|
||||
return routeSpecificComponent?.Component;
|
||||
.find(({ route }) => (
|
||||
route.path === currentRoute.path
|
||||
&& route.clusterFrame === currentRoute.clusterFrame
|
||||
))
|
||||
?.Component;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user