[web] Support multi-byte characters in online user name (#26882)

GitOrigin-RevId: 9547ed7df13fcf8bb51ddd8c3f59167c2099e4e6
This commit is contained in:
Mathias Jakobsen
2025-07-09 15:04:09 +01:00
committed by Copybot
parent 78b386b521
commit 56998dfcd6

View File

@@ -86,9 +86,10 @@ const OnlineUserWidget = ({
const OnlineUserCircle = ({ user }: { user: OnlineUser }) => {
const backgroundColor = getBackgroundColorForUserId(user.user_id)
const [character] = [...user.name]
return (
<span className="online-user-circle" style={{ backgroundColor }}>
{user.name.charAt(0)}
{character}
</span>
)
}