Skip to content

Commit

Permalink
reuse getCustomAvatarContent fn
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaskikutis committed Aug 9, 2023
1 parent ed9adcd commit 9efc6f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/components/UserAvatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function getCustomAvatarContent(user: IUser) {
export class UserAvatar extends React.PureComponent<IProps> {
render() {
const {user} = this.props;
const AvatarContent = CC.UserAvatar;

const size: IProps['size'] = this.props.size ?? 'small';

Expand All @@ -42,7 +41,7 @@ export class UserAvatar extends React.PureComponent<IProps> {
displayName={user.display_name}
initials={getUserInitials(user.display_name)}
size={size}
customContent={AvatarContent == null ? null : <AvatarContent user={user} />}
customContent={getCustomAvatarContent(user)}
tooltip={this.props.tooltip}
/>
);
Expand Down

0 comments on commit 9efc6f1

Please sign in to comment.