Skip to content

Commit

Permalink
EPMRPP-98469 || Code review fixes - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
iso9000t committed Jan 16, 2025
1 parent 5de8feb commit c5d5eb1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
45 changes: 23 additions & 22 deletions app/src/pages/common/membersPage/userNameCell/userNameCell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,31 @@ export const UserNameCell = ({ user, badges }) => {
<div className={cx('user-name-cell')}>
<UserAvatar className={cx('user-avatar')} userId={user.id} thumbnail />
<div className={cx('name-badge-wrapper')}>
{' '}
<div className={cx('full-name')}>{user.fullName}</div>
<div className={cx('badges')}>
{badges.map(({ title, type }) => {
const badgeContent = (
<div key={`${user.id}-${type}`} className={cx('badge', type)}>
{formatMessage(title)}
</div>
);
{badges.length > 0 && (
<div className={cx('badges')}>
{badges.map(({ title, type }) => {
const badgeContent = (
<div key={`${user.id}-${type}`} className={cx('badge', type)}>
{formatMessage(title)}
</div>
);

return type === ADMIN_TYPE ? (
<Tooltip
key={`${user.id}-${type}-tooltip`}
content={formatMessage(messages.adminAccessInfo)}
placement="top"
width={248}
>
{badgeContent}
</Tooltip>
) : (
badgeContent
);
})}
</div>
return type === ADMIN_TYPE ? (
<Tooltip
key={`${user.id}-${type}-tooltip`}
content={formatMessage(messages.adminAccessInfo)}
placement="top"
width={248}
>
{badgeContent}
</Tooltip>
) : (
badgeContent
);
})}
</div>
)}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
min-width: 0;
}

.badges {
Expand Down

0 comments on commit c5d5eb1

Please sign in to comment.