+
{users.map(({ connectionId, info }) => {
- return
- })}
+ const c = colorNames[
+ connectionId % colorNames.length
+ ] as keyof typeof colors
- {currentUser && (
-
- )}
+ return (
+
+ {info.name
+ .split(" ")
+ .slice(0, 2)
+ .map((letter) => letter[0].toUpperCase())}
+
+ )
+ })}
)
}
diff --git a/frontend/components/ui/userButton.tsx b/frontend/components/ui/userButton.tsx
index 9cb7747..20f0440 100644
--- a/frontend/components/ui/userButton.tsx
+++ b/frontend/components/ui/userButton.tsx
@@ -29,13 +29,19 @@ export default function UserButton({ userData }: { userData: User }) {
.map((name) => name[0].toUpperCase())}
-