if username and email are the same then display username only w/ burnettk

This commit is contained in:
jasquat 2023-05-18 10:11:24 -04:00
parent 7bfe43d617
commit c4e236e737
1 changed files with 6 additions and 5 deletions

View File

@ -97,6 +97,9 @@ export default function NavigationBar() {
aboutLinkElement = <a href="/about">About</a>;
}
const userEmail = UserService.getUserEmail();
const username = UserService.getPreferredUsername();
const profileToggletip = (
<div style={{ display: 'flex' }} id="user-profile-toggletip">
<Toggletip isTabTip align="bottom-right">
@ -105,15 +108,13 @@ export default function NavigationBar() {
className="user-profile-toggletip-button"
type="button"
>
<div className="user-circle">
{UserService.getPreferredUsername()[0].toUpperCase()}
</div>
<div className="user-circle">{username[0].toUpperCase()}</div>
</ToggletipButton>
<ToggletipContent className="user-profile-toggletip-content">
<p>
<strong>{UserService.getPreferredUsername()}</strong>
<strong>{username}</strong>
</p>
<p>{UserService.getUserEmail()}</p>
{username !== userEmail && <p>{userEmail}</p>}
<hr />
{aboutLinkElement}
<a target="_blank" href={documentationUrl} rel="noreferrer">