mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-16 20:20:29 +03:00
Use Unicode aware character-wise slicing (#159)
This commit is contained in:
parent
2c9e32b6c4
commit
6e9394ec7a
10 changed files with 11 additions and 11 deletions
|
|
@ -29,7 +29,7 @@ function Avatar({
|
|||
{
|
||||
iconSrc !== null
|
||||
? <RawIcon size={size} src={iconSrc} />
|
||||
: text !== null && <Text variant={textSize}>{text}</Text>
|
||||
: text !== null && <Text variant={textSize}>{[...text][0]}</Text>
|
||||
}
|
||||
</span>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue