Skip to content

Commit

Permalink
DONE
Browse files Browse the repository at this point in the history
  • Loading branch information
pakelcomedy committed Dec 11, 2024
1 parent 0b5a483 commit 055a0f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,14 @@ function checkResult() {
}
});

// Show the win amount if there's a win
const winElement = document.getElementById("win");
if (totalWin > 0) {
winElement.textContent = totalWin;
winElement.style.display = "inline"; // Show the win element
updateFirebaseBalance(totalWin); // Add winnings to balance
} else {
winElement.style.display = "none"; // Hide the win element if no win
}
}

Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<div class="info mb-3">
<span>Bet: <strong class="text-warning">50</strong></span>
<span>Balance: <strong class="text-warning" id="balance"></strong></span>
<span>Win: <strong class="text-warning" id="win" style="display:none;"></strong></span>
<!-- Google Sign-In Button -->
</div>
<!-- Start Button -->
Expand Down

0 comments on commit 055a0f5

Please sign in to comment.