Keep using HomepageCompositionRoot
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
This commit is contained in:
@@ -114,7 +114,9 @@ const routes = (
|
||||
<FlatRoutes>
|
||||
<Navigate key="/" to="catalog" />
|
||||
{/* TODO(rubenl): Move this to / once its more mature and components exist */}
|
||||
<Route path="/home" element={<HomePage />} />
|
||||
<Route path="/home" element={<HomepageCompositionRoot />}>
|
||||
<HomePage />
|
||||
</Route>
|
||||
<Route path="/catalog" element={<CatalogIndexPage />} />
|
||||
<Route
|
||||
path="/catalog/:namespace/:kind/:name"
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
|
||||
import React, { ReactNode } from 'react';
|
||||
import { useOutlet } from 'react-router';
|
||||
import {
|
||||
Content,
|
||||
Header,
|
||||
Page,
|
||||
HomepageTimer,
|
||||
} from '@backstage/core-components';
|
||||
|
||||
export const HomepageCompositionRoot = (props: {
|
||||
title?: string;
|
||||
@@ -29,12 +23,5 @@ export const HomepageCompositionRoot = (props: {
|
||||
}) => {
|
||||
const outlet = useOutlet();
|
||||
const children = props.children ?? outlet;
|
||||
return (
|
||||
<Page themeId="home">
|
||||
<Header title={props.title ?? 'Home'}>
|
||||
<HomepageTimer />
|
||||
</Header>
|
||||
<Content>{children}</Content>
|
||||
</Page>
|
||||
);
|
||||
return <div>{children}</div>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user