Add loading scores message
parent
36de9b3773
commit
9ea7162a0c
|
@ -60,8 +60,10 @@ async function loadTable() {
|
||||||
if(selectedTeamID && selectedDivisionID) {
|
if(selectedTeamID && selectedDivisionID) {
|
||||||
gamesTableHeader.textContent = `Scores for ${teamDropdown.options[teamDropdown.selectedIndex].text}`;
|
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 requestURL = `/fetch/index/scores?team=${+selectedTeamID}&division=${+selectedDivisionID}&season=${+selectedSeasonID}`;
|
||||||
const gamesList = await (await fetch(requestURL)).json();
|
const gamesList = await (await fetch(requestURL)).json();
|
||||||
|
noScoresMessage.textContent = "";
|
||||||
if(gamesList.length > 0) {
|
if(gamesList.length > 0) {
|
||||||
await setupGamesTableHeaders();
|
await setupGamesTableHeaders();
|
||||||
|
|
||||||
|
|
Reference in New Issue