fix: consecutive tournaments, changed some language

This commit is contained in:
2026-04-15 16:38:31 -04:00
Unverified
parent 1f7a482e75
commit 8c5af69144
2 changed files with 7 additions and 3 deletions

View File

@@ -144,6 +144,7 @@ export default function SpectatePage() {
setScores([]); setScores([]);
setKnockoutRawData(""); setKnockoutRawData("");
setTournamentWinner(null); setTournamentWinner(null);
resetLiveGames();
addLog(`🏆 Tournament started: ${msg.tournamentType}`); addLog(`🏆 Tournament started: ${msg.tournamentType}`);
send(cmd.gameList()); send(cmd.gameList());
send(cmd.playerList()); send(cmd.playerList());
@@ -157,6 +158,7 @@ export default function SpectatePage() {
setTournamentType(null); setTournamentType(null);
setKnockoutRawData(""); setKnockoutRawData("");
setTournamentWinner(null); setTournamentWinner(null);
resetLiveGames();
addLog("❌ Tournament cancelled"); addLog("❌ Tournament cancelled");
break; break;
@@ -859,6 +861,8 @@ function buildKnockoutBracket(
const nextRound = displayRounds[roundIndex + 1]; const nextRound = displayRounds[roundIndex + 1];
const nextRoundPlayer = nextRound?.players[matchIndex] ?? null; const nextRoundPlayer = nextRound?.players[matchIndex] ?? null;
const liveMatch = findLiveMatch(liveGameEntries, player1, player2); const liveMatch = findLiveMatch(liveGameEntries, player1, player2);
const displayPlayer1 = liveMatch?.player1 ?? player1;
const displayPlayer2 = liveMatch?.player2 ?? player2;
const hasAdvancedPastRound = const hasAdvancedPastRound =
roundIndex < rounds.length - 1 && roundIndex < rounds.length - 1 &&
!displayRounds[roundIndex + 1]?.projected; !displayRounds[roundIndex + 1]?.projected;
@@ -879,8 +883,8 @@ function buildKnockoutBracket(
key: `${roundIndex}-${matchIndex}-${player1 ?? "tbd"}-${player2 ?? "tbd"}`, key: `${roundIndex}-${matchIndex}-${player1 ?? "tbd"}-${player2 ?? "tbd"}`,
roundIndex, roundIndex,
matchIndex, matchIndex,
player1, player1: displayPlayer1,
player2, player2: displayPlayer2,
winner, winner,
currentTurnColor: winner currentTurnColor: winner
? null ? null

View File

@@ -57,7 +57,7 @@ export default function Celebration() {
{winner} {winner}
</h2> </h2>
<p className="mt-4 text-base text-amber-100/85"> <p className="mt-4 text-base text-amber-100/85">
Dominated the bracket and closed out the tournament. Dominated and closed out the tournament.
</p> </p>
<button <button
type="button" type="button"