Skip to content

Commit

Permalink
feat(hub): renamed hub apps to match new infra for shadow prod
Browse files Browse the repository at this point in the history
ref: MANAGER-15567

Signed-off-by: Jacques Larique <[email protected]>
  • Loading branch information
Jacques Larique committed Oct 16, 2024
1 parent 70a37bc commit 30ee714
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function makeRoute({
const { hash, path } = appConfig.container;
const normalizedHash = (hash || '').replace(/^\//, '');
const target = [path || id, normalizedHash, '*'].filter((i) => i).join('/');
console.log(target, appConfig);
return (
<Route
key={id}
Expand Down Expand Up @@ -70,6 +71,11 @@ export function IFrameAppRouter({
const defaultRoute = useMemo(() => makeDefaultRoute({ configuration }), [
configuration,
]);
const hubReactRoute = useMemo(
() =>
makeRoute({ appConfig: configuration['hub-react'], iframeRef, id: 'hub-react' }),
[configuration],
);
const routes = useMemo(
() =>
Object.entries(configuration).map(([id, appConfig]) =>
Expand All @@ -81,6 +87,7 @@ export function IFrameAppRouter({
return (
<Routes>
{redirections}
{hubReactRoute}
{defaultRoute}
{routes}
<Route path="*" element={<IndexRoute />} />
Expand Down

0 comments on commit 30ee714

Please sign in to comment.