Skip to content

Commit

Permalink
Display a reason from server when leaderboard is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDavis05 committed Nov 1, 2023
1 parent c70667b commit 6cb184a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ function getPurchases(userInfo) {
leaderboard.appendChild(leaderboardTable);
} else {
leaderboard.innerHTML = `<p class="center-text error-text">Web access to the leaderboard is disabled.</p>`;
document.getElementById('footer-text').innerText = data.hasOwnProperty('message')
? data.message
: 'Access to the leaderboard has been disabled by a club officer.';
}
})
.catch((error) => {
Expand Down

0 comments on commit 6cb184a

Please sign in to comment.