From c4e236e7372bc4895464b2a9ef9c8daf2a70c14e Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 18 May 2023 10:11:24 -0400 Subject: [PATCH] if username and email are the same then display username only w/ burnettk --- .../src/components/NavigationBar.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spiffworkflow-frontend/src/components/NavigationBar.tsx b/spiffworkflow-frontend/src/components/NavigationBar.tsx index 54064dc17..b9301d9fc 100644 --- a/spiffworkflow-frontend/src/components/NavigationBar.tsx +++ b/spiffworkflow-frontend/src/components/NavigationBar.tsx @@ -97,6 +97,9 @@ export default function NavigationBar() { aboutLinkElement = About; } + const userEmail = UserService.getUserEmail(); + const username = UserService.getPreferredUsername(); + const profileToggletip = (
@@ -105,15 +108,13 @@ export default function NavigationBar() { className="user-profile-toggletip-button" type="button" > -
- {UserService.getPreferredUsername()[0].toUpperCase()} -
+
{username[0].toUpperCase()}

- {UserService.getPreferredUsername()} + {username}

-

{UserService.getUserEmail()}

+ {username !== userEmail &&

{userEmail}

}
{aboutLinkElement}