Skip to content

Commit

Permalink
Leave button Test4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashikkalis committed Jan 10, 2025
1 parent ac752e7 commit 22ff5fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/js/dashboard/lobbys.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div>
<button class="btn btn-primary btn-sm ready-btn" style="display:none;" data-user-id="${lobbys.user_id}">Ready</button>
<button class="btn btn-primary btn-sm start-btn" style="display:none;" data-lobby-id="${lobbys.game_id}">Start</button>
<button class="btn btn-primary btn-sm start-btn" style="display:none; background-color:red" data-lobby-id="${lobbys.game_id}">Leave</button>
`;

// li.innerHTML = `
Expand All @@ -60,7 +60,7 @@
// const readyButton3 = li.querySelector('.ready-btn3');
// const readyButton4 = li.querySelector('.ready-btn4');
const startButton = li.querySelector('.start-btn');
// const leaveButton = li.querySelector('.leave-btn');
const leaveButton = li.querySelector('.leave-btn');

li.querySelector('.join-btn').addEventListener('click', async (event) => {
const userId = getCookieValue('user_id');
Expand Down Expand Up @@ -88,7 +88,7 @@
joinButton.style.display = 'none';
readyButton.style.display = 'inline-block';
readyButton.disabled = false;
// leaveButton.style.display = 'inline-block';
leaveButton.style.display = 'inline-block';

// if(userId == userId){
// readyButton1.style.display = 'inline-block';
Expand Down

0 comments on commit 22ff5fd

Please sign in to comment.