mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 11:10: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
|
|
@ -48,7 +48,7 @@ function ImageUpload({
|
|||
>
|
||||
<Avatar
|
||||
imageSrc={imageSrc}
|
||||
text={text.slice(0, 1)}
|
||||
text={text}
|
||||
bgColor={bgColor}
|
||||
size="large"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ function RoomIntro({
|
|||
}) {
|
||||
return (
|
||||
<div className="room-intro">
|
||||
<Avatar imageSrc={avatarSrc} text={name.slice(0, 1)} bgColor={colorMXID(roomId)} size="large" />
|
||||
<Avatar imageSrc={avatarSrc} text={name} bgColor={colorMXID(roomId)} size="large" />
|
||||
<div className="room-intro__content">
|
||||
<Text className="room-intro__name" variant="h1">{heading}</Text>
|
||||
<Text className="room-intro__desc" variant="b1">{linkifyContent(desc)}</Text>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ function RoomSelector({
|
|||
content={(
|
||||
<>
|
||||
<Avatar
|
||||
text={name.slice(0, 1)}
|
||||
text={name}
|
||||
bgColor={colorMXID(roomId)}
|
||||
imageSrc={imageSrc}
|
||||
iconSrc={iconSrc}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function RoomTile({
|
|||
<Avatar
|
||||
imageSrc={avatarSrc}
|
||||
bgColor={colorMXID(id)}
|
||||
text={name.slice(0, 1)}
|
||||
text={name}
|
||||
/>
|
||||
</div>
|
||||
<div className="room-tile__content">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue