Skip to content

Commit 233a468

Browse files
committed
fix if
1 parent 6465dc5 commit 233a468

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

app/src/components/left/RoomsContainer.tsx

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,13 @@ const RoomsContainer = () => {
8888
if (socket) {
8989
//run everytime when a client connects to server
9090
socket.on('connect', () => {
91-
if (method === 'CREATE') {
92-
socket.emit(
93-
'creating a room',
94-
userName,
95-
roomCode,
96-
roomPassword,
97-
method
98-
);
99-
// socket.emit('creating', userName, roomCode, roomPassword);
100-
} else if (method === 'JOIN') {
101-
socket.emit(
102-
'creating a room',
103-
userName,
104-
roomCode,
105-
roomPassword,
106-
method
107-
);
108-
}
91+
socket.emit(
92+
'creating a room',
93+
userName,
94+
roomCode,
95+
roomPassword,
96+
method
97+
);
10998
});
11099

111100
socket.on('wrong password', () => {

0 commit comments

Comments
 (0)