Made welcome page configurable (#6232)

Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Jim EhrismannandSebastian Malton authored and GitHub committed 2022-09-14 09:07:44 -04:00
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;
});
},
});