export TechDocsReaderPage as routable extension, do not export DefaultTechDocsHome as routable extension

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-02-25 14:24:51 +01:00
parent 8049538eb1
commit 69a5d47ff8
4 changed files with 23 additions and 22 deletions
+1
View File
@@ -31,6 +31,7 @@ export {
TechDocsCustomHome,
TechDocsIndexPage,
TechdocsPage,
TechDocsReaderPage,
techdocsPlugin as plugin,
techdocsPlugin,
} from './plugin';
+16 -16
View File
@@ -119,22 +119,6 @@ export const TechDocsCustomHome = techdocsPlugin.provide(
}),
);
/**
* Component which renders a default documentation landing page.
*
* @public
*/
export const DefaultTechDocsHome = techdocsPlugin.provide(
createRoutableExtension({
name: 'DefaultTechDocsHome',
component: () =>
import('./home/components/DefaultTechDocsHome').then(
m => m.DefaultTechDocsHome,
),
mountPoint: rootRouteRef,
}),
);
/**
* Responsible for rendering the provided router element
*
@@ -150,3 +134,19 @@ export const TechDocsIndexPage = techdocsPlugin.provide(
mountPoint: rootRouteRef,
}),
);
/**
* Component responsible for composing a TechDocs reader page experience
*
* @public
*/
export const TechDocsReaderPage = techdocsPlugin.provide(
createRoutableExtension({
name: 'TechDocsReaderPage',
component: () =>
import('./reader/components/TechDocsReaderPage').then(
m => m.TechDocsReaderPage,
),
mountPoint: rootDocsRouteRef,
}),
);
@@ -50,11 +50,6 @@ export type TechDocsReaderPageProps = {
children?: TechDocsReaderPageRenderFunction | React.ReactNode;
};
/**
* Component responsible for composing a TechDocs reader page experience
*
* @public
*/
export const TechDocsReaderPage = (props: TechDocsReaderPageProps) => {
const { children } = props;
const { NotFoundErrorPage } = useApp().getComponents();
@@ -15,7 +15,12 @@
*/
export * from './Reader';
export * from './TechDocsReaderPage';
export type {
TechDocsReaderPageProps,
TechDocsPageRenderFunction,
TechDocsReaderPageRenderFunction,
} from './TechDocsReaderPage';
export { TechDocsPage } from './TechDocsReaderPage';
export * from './TechDocsReaderPageHeader';
export * from './TechDocsStateIndicator';