if username and email are the same then display username only w/ burnettk
This commit is contained in:
parent
05bccf5af3
commit
8a8b2b7b57
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue