Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/components/UserCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ const UserCard = forwardRef(({
<Skeleton width='32%' mi='x2'/>
<Skeleton width='32%' mi='x2'/>
</>,
bio = <>
bio,
bioStructure = <>
<Skeleton width='100%'/>
<Skeleton width='100%'/>
<Skeleton width='100%'/>
Expand All @@ -81,7 +82,7 @@ const UserCard = forwardRef(({
{ customStatus && <Info>{customStatus}</Info> }
<Roles>{roles}</Roles>
<Info>{localTime}</Info>
{ bio && <Info withTruncatedText={false} style={clampStyle} height='x60'><MarkdownText content={bio}/></Info> }
{bio !== undefined ? bio && <Info withTruncatedText={false} style={clampStyle} height='x60'><MarkdownText content={bio}/></Info> : <Info withTruncatedText={false} style={clampStyle} height='x60'>{bioStructure}</Info>}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of doing this ternary, we can check the type of the bio variable inside of the info element?

{open && <a onClick={open}>{t('See_full_profile')}</a>}
</Box>
{onClose && <Box><ActionButton ghost icon='cross' onClick={onClose}/></Box>}
Expand Down