Skip to content

Commit 6465dc5

Browse files
committed
styling and username fixed
1 parent cbae5a3 commit 6465dc5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

app/src/components/left/RoomsContainer.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,16 +395,13 @@ const RoomsContainer = () => {
395395
</Typography>
396396
{userJoined ? (
397397
<>
398-
<Typography
399-
variant="h6"
400-
color={userColors[userList.indexOf(userName)]}
401-
>
398+
<Typography variant="h6" color="#898a8b">
402399
Nickname: {userName}
403400
</Typography>
404401
<Typography
405402
variant="body1"
406403
sx={{
407-
color: 'white'
404+
color: '#898a8b'
408405
}}
409406
>
410407
Users: {userList.length}
@@ -415,11 +412,9 @@ const RoomsContainer = () => {
415412
height: 300,
416413
maxWidth: 200,
417414
bgcolor: '#333333',
418-
border: '3px solid #f2fbf8',
419415
borderRadius: '5%',
420416
display: 'flex',
421417
flexDirection: 'column',
422-
alignItems: 'center',
423418
overflow: 'auto',
424419
color: 'white'
425420
}}

server/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ io.on('connection', (client) => {
190190
//disconnecting functionality
191191
client.on('disconnecting', () => {
192192
const roomCode = Array.from(client.rooms)[1]; //grabbing current room client was in when disconnecting
193-
const userName = roomLists[roomCode][client.id];
193+
const userName = roomLists[roomCode][client.id].userName;
194194
delete roomLists[roomCode][client.id];
195195
//if room empty, delete room from room list
196196
if (!Object.keys(roomLists[roomCode]).length) {

0 commit comments

Comments
 (0)