mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: improve avatar alt text (#892)
* fix: improve avatar alt text * refactor: fix unknown avatar path on localhost
This commit is contained in:
parent
89288f2835
commit
8a3db090d5
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
@ -104,7 +104,7 @@ const ChangePassword = ({
|
||||
<div className={commonStyles.flexRow}>
|
||||
<Avatar
|
||||
variant="rounded"
|
||||
alt={user.name}
|
||||
alt="Gravatar"
|
||||
src={user.imageUrl}
|
||||
title={`${
|
||||
user.name || user.email || user.username
|
||||
|
@ -53,7 +53,7 @@ const DeleteUser = ({
|
||||
<div data-loading className={commonStyles.flexRow}>
|
||||
<Avatar
|
||||
variant="rounded"
|
||||
alt={user.name}
|
||||
alt="Gravatar"
|
||||
src={user.imageUrl}
|
||||
title={`${
|
||||
user.name || user.email || user.username
|
||||
|
@ -50,7 +50,7 @@ const UserListItem = ({
|
||||
<TableCell align="center" className={styles.hideXS}>
|
||||
<Avatar
|
||||
data-loading
|
||||
alt={user.name}
|
||||
alt="Gravatar"
|
||||
src={user.imageUrl}
|
||||
className={styles.avatar}
|
||||
title={`${user.name || user.email || user.username} (id: ${
|
||||
|
@ -45,7 +45,7 @@ export const ProjectAccessListItem = ({
|
||||
return (
|
||||
<ListItem key={user.id} button>
|
||||
<ListItemAvatar>
|
||||
<Avatar alt={user.name} src={user.imageUrl} />
|
||||
<Avatar alt="Gravatar" src={user.imageUrl} />
|
||||
</ListItemAvatar>
|
||||
<ListItemText
|
||||
id={labelId}
|
||||
|
@ -8,6 +8,7 @@ import UserProfileContent from './UserProfileContent/UserProfileContent';
|
||||
import { IUser } from 'interfaces/user';
|
||||
import { ILocationSettings } from 'hooks/useLocationSettings';
|
||||
import { HEADER_USER_AVATAR } from 'utils/testIds';
|
||||
import unknownUser from 'assets/icons/unknownUser.png';
|
||||
|
||||
interface IUserProfileProps {
|
||||
profile: IUser;
|
||||
@ -53,7 +54,7 @@ const UserProfile = ({
|
||||
}, [locationSettings]);
|
||||
|
||||
const email = profile ? profile.email : '';
|
||||
const imageUrl = email ? profile.imageUrl : 'unknown-user.png';
|
||||
const imageUrl = email ? profile.imageUrl : unknownUser;
|
||||
|
||||
return (
|
||||
<ClickAwayListener onClickAway={() => setShowProfile(false)}>
|
||||
@ -69,7 +70,7 @@ const UserProfile = ({
|
||||
disableRipple
|
||||
>
|
||||
<Avatar
|
||||
alt="user image"
|
||||
alt="Your Gravatar"
|
||||
src={imageUrl}
|
||||
data-testid={HEADER_USER_AVATAR}
|
||||
/>
|
||||
|
@ -74,7 +74,7 @@ const UserProfileContent = ({
|
||||
)}
|
||||
>
|
||||
<Avatar
|
||||
alt="user image"
|
||||
alt="Your Gravatar"
|
||||
src={imageUrl}
|
||||
className={profileAvatarClasses}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user