@@ -73,7 +73,7 @@ const RoomsContainer = () => {
73
73
//run everytime when a client connects to server
74
74
socket . on ( 'connect' , ( ) => {
75
75
socket . emit ( 'joining' , userName , roomCode ) ;
76
- console . log ( `${ userName } Joined room ${ roomCode } from RoomsConatiner ` ) ;
76
+ console . log ( `${ userName } Joined room ${ roomCode } from RoomsContainer ` ) ;
77
77
} ) ;
78
78
79
79
//If you are the host: send current state to server when a new user joins
@@ -175,27 +175,15 @@ const RoomsContainer = () => {
175
175
>
176
176
{ ' ' }
177
177
{ /* live room display */ }
178
- < Typography variant = "h5" color = { 'white ' } >
178
+ < Typography variant = "h5" color = { '#f2fbf8 ' } >
179
179
Live Room: { roomCode }
180
180
</ Typography >
181
+ < Typography variant = "h6" color = { '#70d8be' } >
182
+ Nickname: { userName }
183
+ </ Typography >
181
184
{ /* Set up condition rendering depends on if user joined a room then render leave button if not render join button */ }
182
185
{ userJoined ? (
183
186
< >
184
- < Button
185
- variant = "contained"
186
- onClick = { ( ) => leaveRoom ( ) }
187
- sx = { {
188
- backgroundColor : '#ffffff' ,
189
- color : '#000000' ,
190
- '&:hover' : {
191
- backgroundColor : '#C6C6C6' ,
192
- borderColor : '#0062cc'
193
- }
194
- } }
195
- >
196
- { ' ' }
197
- Leave Room{ ' ' }
198
- </ Button >
199
187
< Typography
200
188
variant = "body1"
201
189
sx = { {
@@ -211,7 +199,7 @@ const RoomsContainer = () => {
211
199
height : 300 ,
212
200
maxWidth : 200 ,
213
201
bgcolor : '#333333' ,
214
- border : '3px solid white ' ,
202
+ border : '3px solid #f2fbf8 ' ,
215
203
borderRadius : '5%' ,
216
204
display : 'flex' ,
217
205
flexDirection : 'column' ,
@@ -233,7 +221,7 @@ const RoomsContainer = () => {
233
221
< ListItem
234
222
key = { index }
235
223
sx = { {
236
- color : 'white ' ,
224
+ color : '#f2fbf8 ' ,
237
225
textAlign : 'center' ,
238
226
width : '100%'
239
227
} }
@@ -247,6 +235,21 @@ const RoomsContainer = () => {
247
235
) ) }
248
236
</ List >
249
237
</ Box >
238
+ < Button
239
+ variant = "contained"
240
+ onClick = { ( ) => leaveRoom ( ) }
241
+ sx = { {
242
+ backgroundColor : '#f2fbf8' ,
243
+ color : '#092a26' ,
244
+ '&:hover' : {
245
+ backgroundColor : '#a5ead6' ,
246
+ borderColor : '#0062cc'
247
+ }
248
+ } }
249
+ >
250
+ { ' ' }
251
+ Leave Room{ ' ' }
252
+ </ Button >
250
253
</ >
251
254
) : (
252
255
//after joinning room
@@ -274,10 +277,10 @@ const RoomsContainer = () => {
274
277
disabled = { checkInputField ( userName , roomCode ) }
275
278
onClick = { ( ) => joinRoom ( ) }
276
279
sx = { {
277
- backgroundColor : '#ffffff ' ,
278
- color : '#000000 ' ,
280
+ backgroundColor : '#f2fbf8 ' ,
281
+ color : '#092a26 ' ,
279
282
'&:hover' : {
280
- backgroundColor : '#C6C6C6 ' ,
283
+ backgroundColor : '#a5ead6 ' ,
281
284
borderColor : '#0062cc'
282
285
}
283
286
} }
0 commit comments