Flip teams to format <away>@<home>

Checking the first ten or so results, the ESPN API always seems to
return them in this order. If that ever stops being the case, we can
always check if `competitors[0]` is home or away, but that appears to be
unnecessary at this point.

Requested-By: Eric Villnow
Fixes: #2
This commit is contained in:
Chandler Swift 2025-01-15 22:16:55 -06:00
parent 4f27723920
commit 9100cd6ced
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -70,10 +70,10 @@
const competition = event.competitions[0];
console.log(competition);
const params = new URLSearchParams({
left_logo: competition.competitors[0].team.logo,
right_logo: competition.competitors[1].team.logo,
left_color: competition.competitors[0].team.color,
right_color: competition.competitors[1].team.color,
left_logo: competition.competitors[1].team.logo,
right_logo: competition.competitors[0].team.logo,
left_color: competition.competitors[1].team.color,
right_color: competition.competitors[0].team.color,
});
const a = document.createElement('a');