Show error message if room is full
This commit is contained in:
parent
6c14f8619a
commit
cf442cd629
@ -47,13 +47,10 @@ document.getElementById('ok').addEventListener('click', function () {
|
||||
});
|
||||
|
||||
socket.on('error', function (data) {
|
||||
if (data === 'Game started already or room has two many members') {
|
||||
document.getElementById('login').style.display = 'flex';
|
||||
document.getElementById('game').style.display = 'none';
|
||||
document.getElementById('chat').style.display = 'none';
|
||||
document.getElementById('error').innerText = data;
|
||||
}
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
socket.on('new message', function (data) {
|
||||
|
Loading…
Reference in New Issue
Block a user