mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
fix(console): display default avatar when the avatar is empty (#1191)
This commit is contained in:
parent
9194a6ee54
commit
71ed416bde
3 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ const UserInfo = () => {
|
|||
setShowDropdown(true);
|
||||
}}
|
||||
>
|
||||
<img src={avatar ?? getAvatarById(id)} />
|
||||
<img src={avatar || getAvatarById(id)} />
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.name}>{name || t('users.unnamed')}</div>
|
||||
</div>
|
||||
|
|
|
@ -120,7 +120,7 @@ const UserDetails = () => {
|
|||
{userId && data && (
|
||||
<>
|
||||
<Card className={styles.header}>
|
||||
<img className={styles.avatar} src={data.avatar ?? getAvatarById(userId)} />
|
||||
<img className={styles.avatar} src={data.avatar || getAvatarById(userId)} />
|
||||
<div className={styles.metadata}>
|
||||
<div className={styles.name}>{data.name ?? '-'}</div>
|
||||
<div>
|
||||
|
|
|
@ -127,7 +127,7 @@ const Users = () => {
|
|||
<ItemPreview
|
||||
title={name || t('users.unnamed')}
|
||||
subtitle={conditionalString(username)}
|
||||
icon={<img className={styles.avatar} src={avatar ?? getAvatarById(id)} />}
|
||||
icon={<img className={styles.avatar} src={avatar || getAvatarById(id)} />}
|
||||
to={`/users/${id}`}
|
||||
size="compact"
|
||||
/>
|
||||
|
|
Loading…
Add table
Reference in a new issue