catalog: switch out time-based greeting for plain title
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user