mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
Merge pull request #13406 from overleaf/ae-unicode-char
Use a Unicode-aware method to get the first character of the user name GitOrigin-RevId: 04beccb906f40a452f03795b0cd9046bd95c32ec
This commit is contained in:
@@ -72,11 +72,13 @@ function UserIcon({ user, showName, onClick }) {
|
||||
onClick(user)
|
||||
}
|
||||
|
||||
const [character] = [...user.name]
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
||||
<span onClick={handleOnClick}>
|
||||
<span className="online-user" style={{ backgroundColor }}>
|
||||
{user.name.slice(0, 1)}
|
||||
{character}
|
||||
</span>
|
||||
{showName && user.name}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user