Incorporated the feedback.

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2022-07-06 13:21:41 +02:00
parent 5c782900e3
commit 67550c6b99
2 changed files with 8 additions and 8 deletions
@@ -23,12 +23,7 @@ import {
TableColumn,
TableProps,
} from '@backstage/core-components';
import {
configApiRef,
useApi,
usePluginOptions,
useRouteRef,
} from '@backstage/core-plugin-api';
import { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';
import {
CatalogFilterLayout,
EntityLifecyclePicker,
@@ -44,7 +39,7 @@ import React from 'react';
import { createComponentRouteRef } from '../../routes';
import { CatalogTable, CatalogTableRow } from '../CatalogTable';
import { CatalogKindHeader } from '../CatalogKindHeader';
import { CatalogPluginOptions } from '../../options';
import { useCatalogPluginOptions } from '../../options';
/**
* Props for root catalog pages.
@@ -71,7 +66,7 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
const createComponentLink = useRouteRef(createComponentRouteRef);
const { createButtonTitle } = usePluginOptions<CatalogPluginOptions>();
const { createButtonTitle } = useCatalogPluginOptions();
return (
<PageWithHeader title={`${orgName} Catalog`} themeId="home">
+5
View File
@@ -14,6 +14,11 @@
* limitations under the License.
*/
import { usePluginOptions } from '@backstage/core-plugin-api';
export type CatalogPluginOptions = {
createButtonTitle: string;
};
export const useCatalogPluginOptions = () =>
usePluginOptions<CatalogPluginOptions>();