Use Unicode aware character-wise slicing (#159)

This commit is contained in:
Samuel Dionne-Riel
2021-11-10 13:30:25 +05:30
committed by GitHub
parent 2c9e32b6c4
commit 6e9394ec7a
10 changed files with 11 additions and 11 deletions
@@ -257,7 +257,7 @@ function ProfileViewer() {
<div className="profile-viewer__user">
<Avatar
imageSrc={!avatarMxc ? null : mx.mxcUrlToHttp(avatarMxc, 80, 80, 'crop')}
text={username.slice(0, 1)}
text={username}
bgColor={colorMXID(userId)}
size="large"
/>