Create icons for users without an avatar in desktop notifications (#305)
* Add notifications icon for users without an avatar * Render icon at higher resolution * Use scale to render at higher resolution
This commit is contained in:
@@ -8,6 +8,7 @@ import Text from '../text/Text';
|
||||
import RawIcon from '../system-icons/RawIcon';
|
||||
|
||||
import ImageBrokenSVG from '../../../../public/res/svg/image-broken.svg';
|
||||
import { avatarInitials } from '../../../util/common';
|
||||
|
||||
function Avatar({
|
||||
text, bgColor, iconSrc, iconColor, imageSrc, size,
|
||||
@@ -40,7 +41,7 @@ function Avatar({
|
||||
? <RawIcon size={size} src={iconSrc} color={iconColor} />
|
||||
: text !== null && (
|
||||
<Text variant={textSize} primary>
|
||||
{twemojify([...text][0])}
|
||||
{twemojify(avatarInitials(text))}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user