diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx index f06bbc8acd..39c19d717a 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx @@ -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(); + const { createButtonTitle } = useCatalogPluginOptions(); return ( diff --git a/plugins/catalog/src/options.ts b/plugins/catalog/src/options.ts index 5b0e0767e3..edf702ee0b 100644 --- a/plugins/catalog/src/options.ts +++ b/plugins/catalog/src/options.ts @@ -14,6 +14,11 @@ * limitations under the License. */ +import { usePluginOptions } from '@backstage/core-plugin-api'; + export type CatalogPluginOptions = { createButtonTitle: string; }; + +export const useCatalogPluginOptions = () => + usePluginOptions();