Fix missing avatar for show current profiles (#9563)

This commit is contained in:
Germain 2022-11-11 16:02:01 +00:00 committed by GitHub
parent 1dbf9c205e
commit e8d4fbb8ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 127 additions and 55 deletions

View file

@ -77,27 +77,24 @@ export default function MemberAvatar({
) ?? props.fallbackUserId;
}
}
const userId = member?.userId ?? props.fallbackUserId;
return (
<BaseAvatar
{...props}
width={width}
height={height}
resizeMethod={resizeMethod}
name={name ?? ""}
title={props.hideTitle ? undefined : title}
idName={userId}
url={imageUrl}
onClick={viewUserOnClick ? () => {
dis.dispatch({
action: Action.ViewUser,
member: props.member,
push: card.isCard,
});
} : props.onClick}
/>
);
return <BaseAvatar
{...props}
width={width}
height={height}
resizeMethod={resizeMethod}
name={name ?? ""}
title={props.hideTitle ? undefined : title}
idName={member?.userId ?? props.fallbackUserId}
url={imageUrl}
onClick={viewUserOnClick ? () => {
dis.dispatch({
action: Action.ViewUser,
member: props.member,
push: card.isCard,
});
} : props.onClick}
/>;
}
export class LegacyMemberAvatar extends React.Component<IProps> {