refactor: simplify user profile rendering in Header component

This commit is contained in:
Vishnu 2025-03-29 18:16:18 +05:30
parent 4245ca6794
commit a327044b8b
1 changed files with 7 additions and 9 deletions

View File

@ -42,15 +42,13 @@ const Header: React.FC = () => {
<div className="other-guest">+{guestUsers.length - 3}</div>
)}
{guestUsers.slice(0, 3).map((user, index) => (
<>
<div
key={index}
className="user-profile"
style={{ background: getAvatarColor(index) }}
>
{user.userName[0]}
</div>
</>
<div
key={index}
className="user-profile"
style={{ background: getAvatarColor(index) }}
>
{user.userName[0]}
</div>
))}
</div>
<div className="user-profile-container">