Replace deprecated catalog routing

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Johan Haals
2021-02-15 14:05:07 +01:00
parent 536b6b5207
commit fe08d59921
+9 -5
View File
@@ -24,7 +24,8 @@ import {
} from '@backstage/core';
import {
catalogPlugin,
Router as CatalogRouter,
CatalogIndexPage,
CatalogEntityPage,
} from '@backstage/plugin-catalog';
import { CatalogImportPage } from '@backstage/plugin-catalog-import';
import { ExplorePage } from '@backstage/plugin-explore';
@@ -88,11 +89,14 @@ const catalogRouteRef = createRouteRef({
const routes = (
<FlatRoutes>
<Navigate key="/" to="/catalog" />
<Route path="/catalog-import" element={<CatalogImportPage />} />
<Route path="/catalog" element={<CatalogIndexPage />} />
<Route
path={`${catalogRouteRef.path}`}
element={<CatalogRouter EntityPage={EntityPage} />}
/>
path="/catalog/:namespace/:kind/:name"
element={<CatalogEntityPage />}
>
<EntityPage />
</Route>
<Route path="/catalog-import" element={<CatalogImportPage />} />
<Route path="/docs" element={<DocsRouter />} />
<Route path="/create" element={<TemplateIndexPage />} />
<Route path="/create/templates/:templateName" element={<TemplatePage />} />