Skip to content

Commit

Permalink
[FIX] UserCard avatar cache (avatarETag) (#18466)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Aug 7, 2020
1 parent 060a1de commit c33c2ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/channel/UserCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const UserCardWithData = ({ username, onClose, target, open, rid }) => {
bio = defaultValue,
utcOffset = defaultValue,
nickname,
avatarETag,
} = user;

return {
Expand All @@ -70,6 +71,7 @@ const UserCardWithData = ({ username, onClose, target, open, rid }) => {
<UserCard.Role key={index}>{role}</UserCard.Role>
)),
bio,
etag: avatarETag,
localTime: Number.isInteger(utcOffset) && (
<LocalTime utcOffset={utcOffset} />
),
Expand Down
3 changes: 2 additions & 1 deletion client/components/basic/UserCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const UserCard = forwardRef(({
open,
name = <Skeleton width='100%'/>,
username,
etag,
customStatus = <Skeleton width='100%'/>,
roles = <>
<Skeleton width='32%' mi='x2'/>
Expand All @@ -73,7 +74,7 @@ const UserCard = forwardRef(({
t = (e) => e,
}, ref) => <UserCardContainer className={className} ref={ref} style={style}>
<Box>
<UserAvatar username={username} size='x124'/>
<UserAvatar username={username} etag={etag} size='x124'/>
{ actions && <Box flexGrow={0} display='flex' mb='x8' align='center' justifyContent='center'>
{actions}
</Box>}
Expand Down

0 comments on commit c33c2ab

Please sign in to comment.