mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-30 21:42:51 +00: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:
parent
d5dbca09df
commit
374e525cde
1 changed files with 3 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue