Merge pull request #8728 from backstage/timbonicus/catalog-routeref

Add routeRef in catalog customization example
This commit is contained in:
Johan Haals
2022-01-04 09:35:32 +01:00
committed by GitHub
@@ -30,12 +30,15 @@ export const CustomCatalogPage = ({
actions,
initiallySelectedFilter = 'owned',
}: CatalogPageProps) => {
const createComponentLink = useRouteRef(
catalogPlugin.externalRoutes.createComponent,
);
return (
<PageWithHeader title={`${orgName} Catalog`} themeId="home">
<EntityListProvider>
<Content>
<ContentHeader titleComponent={<CatalogKindHeader />}>
<CreateButton title="Create Component" to={link} />
<CreateButton title="Create Component" to={createComponentLink()} />
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<FilteredEntityLayout>