Add loading scores message

main
sudoer777 2022-03-07 23:19:07 -07:00
parent 36de9b3773
commit 9ea7162a0c
1 changed files with 3 additions and 1 deletions

View File

@ -59,9 +59,11 @@ async function loadTable() {
if(selectedTeamID && selectedDivisionID) {
gamesTableHeader.textContent = `Scores for ${teamDropdown.options[teamDropdown.selectedIndex].text}`;
noScoresMessage.textContent = "Loading scores...";
const requestURL = `/fetch/index/scores?team=${+selectedTeamID}&division=${+selectedDivisionID}&season=${+selectedSeasonID}`;
const gamesList = await (await fetch(requestURL)).json();
noScoresMessage.textContent = "";
if(gamesList.length > 0) {
await setupGamesTableHeaders();