Skip to content

Commit

Permalink
fix: ImgAvatar background
Browse files Browse the repository at this point in the history
  • Loading branch information
2fd committed Mar 25, 2020
1 parent 0783a71 commit 1dc4e0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Profile/ImgAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export type ImgAvatarProps = Omit<React.HTMLProps<HTMLImageElement>, 'height' |

export default function ImgAvatar({ profile, address, size, src, ...props }: ImgAvatarProps) {
const image = src || profile?.avatar?.avatar?.snapshots?.face || DEFAULT_AVATAR
const init = (address || profile?.address || '0x0')[2]
const init = (address || profile?.address.toString() || '0x0')[2]
return <img {...props as any} src={image} width="100" height="100" className={classname([StyleNamespace, 'ImgAvatar', `ImgAvatar--${size}`, `ImgAvatar--${init}`, props.className])} />
}

0 comments on commit 1dc4e0a

Please sign in to comment.