mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-10 01:16:39 +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}
|
||||
header={
|
||||
<PageHeader
|
||||
title={`Access overview for ${user.name ?? user.username}`}
|
||||
title={`Access overview for ${user.name || user.email || user.username}`}
|
||||
actions={
|
||||
<ConditionallyRender
|
||||
condition={!isSmallScreen}
|
||||
|
@ -131,7 +131,7 @@ export const ProfileTab = ({ user }: IProfileTabProps) => {
|
||||
<StyledAvatar user={user} />
|
||||
<StyledInfo>
|
||||
<StyledInfoName>
|
||||
{user.name || user.username}
|
||||
{user.name || user.email || user.username}
|
||||
</StyledInfoName>
|
||||
<Typography variant='body1'>{user.email}</Typography>
|
||||
</StyledInfo>
|
||||
|
Loading…
Reference in New Issue
Block a user