fix: actually make fest teams appear properly
This commit is contained in:
parent
74de97bf43
commit
83964d7cf0
1 changed files with 6 additions and 5 deletions
|
|
@ -310,16 +310,17 @@ window.loadHeader(async function(headerContainer) {
|
||||||
const updateSplatfestNames = (fesData) => {
|
const updateSplatfestNames = (fesData) => {
|
||||||
if (!fesData || !fesData.splatfestivalSplatfest) return;
|
if (!fesData || !fesData.splatfestivalSplatfest) return;
|
||||||
const fes = fesData.splatfestivalSplatfest;
|
const fes = fesData.splatfestivalSplatfest;
|
||||||
const teams = fes.teams;
|
const teams = fes.teams; // this is a fucking array u bitch u wrote the code how did you forget that
|
||||||
if (teams && teams.length >= 2) {
|
if (teams && teams.length >= 2) {
|
||||||
const teamLeft = document.querySelector('.team-left-label');
|
const teamLeft = document.querySelector('.team-left-label');
|
||||||
const teamRight = document.querySelector('.team-right-label');
|
const teamRight = document.querySelector('.team-right-label');
|
||||||
if (teamLeft) teamLeft.textContent = teams.USen || "Yaoi";
|
|
||||||
if (teamRight) teamRight.textContent = teams.USen || "Yuri";
|
|
||||||
const subtitle = document.querySelector('.splatfest-subtitle');
|
const subtitle = document.querySelector('.splatfest-subtitle');
|
||||||
|
const name1 = teams[0].USen || "Loading..";
|
||||||
|
const name2 = teams[1].USen || "Loading..";
|
||||||
|
|
||||||
|
if (teamLeft) teamLeft.textContent = name1;
|
||||||
|
if (teamRight) teamRight.textContent = name2;
|
||||||
if (subtitle) {
|
if (subtitle) {
|
||||||
const name1 = teams.USen || "Yaoi";
|
|
||||||
const name2 = teams.USen || "Yuri";
|
|
||||||
subtitle.textContent = `${name1} VS ${name2}`;
|
subtitle.textContent = `${name1} VS ${name2}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue