Merge pull request #1518 from daviddyball/master
Use Config for Filter Org List Header
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
ContentHeader,
|
||||
identityApiRef,
|
||||
SupportButton,
|
||||
configApiRef,
|
||||
useApi,
|
||||
} from '@backstage/core';
|
||||
import { rootRoute as scaffolderRootRoute } from '@backstage/plugin-scaffolder';
|
||||
@@ -51,6 +52,8 @@ const CatalogPageContents = () => {
|
||||
const userId = useApi(identityApiRef).getUserId();
|
||||
const [selectedTab, setSelectedTab] = useState<string>();
|
||||
const [selectedSidebarItem, setSelectedSidebarItem] = useState<string>();
|
||||
const orgName =
|
||||
useApi(configApiRef).getOptionalString('organization.name') ?? 'Company';
|
||||
|
||||
const tabs = useMemo<LabeledComponentType[]>(
|
||||
() => [
|
||||
@@ -98,7 +101,7 @@ const CatalogPageContents = () => {
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Company', // TODO: Replace with Company name, read from app config.
|
||||
name: orgName,
|
||||
items: [
|
||||
{
|
||||
id: 'all',
|
||||
@@ -108,7 +111,7 @@ const CatalogPageContents = () => {
|
||||
],
|
||||
},
|
||||
],
|
||||
[isStarredEntity, userId],
|
||||
[isStarredEntity, userId, orgName],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user