From cdcb9ed2efb83fc7ff0d5454f1a2e5c6f8504603 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Sun, 21 Jun 2020 20:25:24 +0100 Subject: [PATCH] Adding name of signed in user to greeting message (#1387) Co-authored-by: Daniel Davis --- .../components/CatalogPage/CatalogLayout.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/catalog/src/components/CatalogPage/CatalogLayout.tsx b/plugins/catalog/src/components/CatalogPage/CatalogLayout.tsx index 9eccf81818..65715e04c7 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogLayout.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogLayout.tsx @@ -15,23 +15,25 @@ */ import React, { FC } from 'react'; -import { Header, HomepageTimer, Page, pageTheme } from '@backstage/core'; +import { + Header, + HomepageTimer, + Page, + pageTheme, + identityApiRef, + useApi, +} from '@backstage/core'; import { getTimeBasedGreeting } from './utils/timeUtil'; const CatalogLayout: FC<{}> = props => { const { children } = props; - // const profile = useProfile(); - const profile = { givenName: 'friend' }; const greeting = getTimeBasedGreeting(); + const identityApi = useApi(identityApiRef); return (