catalog: switch out time-based greeting for plain title

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-04-26 21:36:50 +02:00
parent 47037a2197
commit 1a142ae8a4
7 changed files with 9 additions and 9 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Switch out the time-based personal greeting for a plain title on the catalog index page.
@@ -18,29 +18,24 @@ import {
configApiRef,
Header,
HomepageTimer,
identityApiRef,
Page,
useApi,
} from '@backstage/core';
import React from 'react';
import { getTimeBasedGreeting } from './utils/timeUtil';
type Props = {
children?: React.ReactNode;
};
const CatalogLayout = ({ children }: Props) => {
const greeting = getTimeBasedGreeting();
const profile = useApi(identityApiRef).getProfile();
const userId = useApi(identityApiRef).getUserId();
const orgName = useApi(configApiRef).getOptionalString('organization.name');
const orgName =
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
return (
<Page themeId="home">
<Header
title={`${greeting.greeting}, ${profile.displayName || userId}!`}
subtitle={`${orgName || 'Backstage'} Service Catalog`}
tooltip={greeting.language}
title={`${orgName} Catalog`}
subtitle={`Index of software components in ${orgName}`}
pageTitleOverride="Home"
>
<HomepageTimer />