Use Unicode aware character-wise slicing (#159)

This commit is contained in:
Samuel Dionne-Riel
2021-11-10 03:00:25 -05:00
committed by GitHub
parent 2c9e32b6c4
commit 6e9394ec7a
10 changed files with 11 additions and 11 deletions

View File

@@ -18,7 +18,7 @@ function PeopleSelector({
onClick={onClick}
type="button"
>
<Avatar imageSrc={avatarSrc} text={name.slice(0, 1)} bgColor={color} size="extra-small" />
<Avatar imageSrc={avatarSrc} text={name} bgColor={color} size="extra-small" />
<Text className="people-selector__name" variant="b1">{name}</Text>
{peopleRole !== null && <Text className="people-selector__role" variant="b3">{peopleRole}</Text>}
</button>