mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-18 01:18:23 +02:00
fix: access overview fallback to email (#9582)
https://linear.app/unleash/issue/2-3430/fix-undefined-in-access-overview-when-user-name-is-unavailable Adds a fallback to email in case the name is not available. Also switches the priority of the fallbacks to be consistent with other places in our codebase (email > username) and uses `||` instead of `??` because falsy values don't provide much informational value anyways. 
This commit is contained in:
parent
afd24aa58a
commit
a10dca44f6
@ -153,7 +153,7 @@ export const AccessOverview = () => {
|
|||||||
isLoading={loading}
|
isLoading={loading}
|
||||||
header={
|
header={
|
||||||
<PageHeader
|
<PageHeader
|
||||||
title={`Access overview for ${user.name ?? user.username}`}
|
title={`Access overview for ${user.name || user.email || user.username}`}
|
||||||
actions={
|
actions={
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={!isSmallScreen}
|
condition={!isSmallScreen}
|
||||||
|
@ -131,7 +131,7 @@ export const ProfileTab = ({ user }: IProfileTabProps) => {
|
|||||||
<StyledAvatar user={user} />
|
<StyledAvatar user={user} />
|
||||||
<StyledInfo>
|
<StyledInfo>
|
||||||
<StyledInfoName>
|
<StyledInfoName>
|
||||||
{user.name || user.username}
|
{user.name || user.email || user.username}
|
||||||
</StyledInfoName>
|
</StyledInfoName>
|
||||||
<Typography variant='body1'>{user.email}</Typography>
|
<Typography variant='body1'>{user.email}</Typography>
|
||||||
</StyledInfo>
|
</StyledInfo>
|
||||||
|
Loading…
Reference in New Issue
Block a user