refactor: Remove the header from the default catalog page

Signed-off-by: Luca Huettner <luca.huettner@gmail.com>
This commit is contained in:
Luca Huettner
2022-11-30 15:11:25 +01:00
parent 0efd2f4b61
commit 462c1d012e
3 changed files with 20 additions and 15 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Remove `CatalogKindHeader` from `DefaultCatalogPage`. Deprecate `CatalogKindHeader`.
@@ -59,7 +59,10 @@ export interface CatalogKindHeaderProps {
initialFilter?: string;
}
/** @public */
/**
* @public
* @deprecated
*/
export function CatalogKindHeader(props: CatalogKindHeaderProps) {
const { initialFilter = 'component', allowedKinds } = props;
const classes = useStyles();
@@ -39,7 +39,6 @@ import {
import React, { ReactNode } from 'react';
import { createComponentRouteRef } from '../../routes';
import { CatalogTable, CatalogTableRow } from '../CatalogTable';
import { CatalogKindHeader } from '../CatalogKindHeader';
import { useCatalogPluginOptions } from '../../options';
/**
@@ -73,17 +72,15 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
return (
<PageWithHeader title={`${orgName} Catalog`} themeId="home">
<EntityListProvider>
<Content>
<ContentHeader
titleComponent={<CatalogKindHeader initialFilter={initialKind} />}
>
<CreateButton
title={createButtonTitle}
to={createComponentLink && createComponentLink()}
/>
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<Content>
<ContentHeader title="">
<CreateButton
title={createButtonTitle}
to={createComponentLink && createComponentLink()}
/>
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<EntityListProvider>
<CatalogFilterLayout>
<CatalogFilterLayout.Filters>
<EntityKindPicker initialFilter={initialKind} />
@@ -103,8 +100,8 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
/>
</CatalogFilterLayout.Content>
</CatalogFilterLayout>
</Content>
</EntityListProvider>
</EntityListProvider>
</Content>
</PageWithHeader>
);
}