TechDocsIndexPage to fall back to DefaultTechDocsHome as LegacyTechDocsHome is deprecated

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-02-25 14:23:49 +01:00
parent d0c90c4f64
commit 8049538eb1
5 changed files with 9 additions and 10 deletions
+1 -3
View File
@@ -169,9 +169,7 @@ const routes = (
/>
}
/>
<Route path="/docs" element={<TechDocsIndexPage />}>
<DefaultTechDocsHome />
</Route>
<Route path="/docs" element={<TechDocsIndexPage />} />
<Route
path="/docs/:namespace/:kind/:name/*"
element={<TechDocsReaderPage />}
@@ -15,7 +15,6 @@ import { orgPlugin } from '@backstage/plugin-org';
import { SearchPage } from '@backstage/plugin-search';
import { TechRadarPage } from '@backstage/plugin-tech-radar';
import {
DefaultTechDocsHome,
TechDocsIndexPage,
techdocsPlugin,
TechDocsReaderPage,
@@ -65,9 +64,7 @@ const routes = (
>
{entityPage}
</Route>
<Route path="/docs" element={<TechDocsIndexPage />}>
<DefaultTechDocsHome />
</Route>
<Route path="/docs" element={<TechDocsIndexPage />} />
<Route
path="/docs/:namespace/:kind/:name/*"
element={<TechDocsReaderPage />}
@@ -49,6 +49,11 @@ export type DefaultTechDocsHomeProps = {
actions?: TableProps<DocsTableRow>['actions'];
};
/**
* Component which renders a default documentation landing page.
*
* @public
*/
export const DefaultTechDocsHome = (props: DefaultTechDocsHomeProps) => {
const { initialFilter = 'all', columns, actions } = props;
return (
@@ -16,10 +16,10 @@
import React from 'react';
import { useOutlet } from 'react-router';
import { LegacyTechDocsHome } from './LegacyTechDocsHome';
import { DefaultTechDocsHome } from './DefaultTechDocsHome';
export const TechDocsIndexPage = () => {
const outlet = useOutlet();
return outlet || <LegacyTechDocsHome />;
return outlet || <DefaultTechDocsHome />;
};
-1
View File
@@ -28,7 +28,6 @@ export * from './search';
export * from './home';
export {
EntityTechdocsContent,
DefaultTechDocsHome,
TechDocsCustomHome,
TechDocsIndexPage,
TechdocsPage,