Skip to content

Commit c0833c0

Browse files
committed
show nickname only after joining the room
1 parent 1852a2d commit c0833c0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/src/components/left/RoomsContainer.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,15 @@ const RoomsContainer = () => {
333333
<Typography variant="h5" color={'#f2fbf8'}>
334334
Live Room: {roomCode}
335335
</Typography>
336-
<Typography variant="h6" color={userColors[userList.indexOf(userName)]}>
337-
Nickname: {userName}
338-
</Typography>
339336
{/* Set up condition rendering depends on if user joined a room then render leave button if not render join button */}
340337
{userJoined ? (
341338
<>
339+
<Typography
340+
variant="h6"
341+
color={userColors[userList.indexOf(userName)]}
342+
>
343+
Nickname: {userName}
344+
</Typography>
342345
<Typography
343346
variant="body1"
344347
sx={{

0 commit comments

Comments
 (0)