1
0
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:
olav 2022-04-20 16:08:15 +02:00 committed by GitHub
parent 89288f2835
commit 8a3db090d5
7 changed files with 8 additions and 7 deletions

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -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

View File

@ -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

View File

@ -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: ${

View File

@ -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}

View File

@ -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}
/>

View File

@ -74,7 +74,7 @@ const UserProfileContent = ({
)}
>
<Avatar
alt="user image"
alt="Your Gravatar"
src={imageUrl}
className={profileAvatarClasses}
/>