diff --git a/connect4-ui/app/spectate/page.tsx b/connect4-ui/app/spectate/page.tsx index 650f88c..6daea9b 100644 --- a/connect4-ui/app/spectate/page.tsx +++ b/connect4-ui/app/spectate/page.tsx @@ -144,6 +144,7 @@ export default function SpectatePage() { setScores([]); setKnockoutRawData(""); setTournamentWinner(null); + resetLiveGames(); addLog(`🏆 Tournament started: ${msg.tournamentType}`); send(cmd.gameList()); send(cmd.playerList()); @@ -157,6 +158,7 @@ export default function SpectatePage() { setTournamentType(null); setKnockoutRawData(""); setTournamentWinner(null); + resetLiveGames(); addLog("❌ Tournament cancelled"); break; @@ -859,6 +861,8 @@ function buildKnockoutBracket( const nextRound = displayRounds[roundIndex + 1]; const nextRoundPlayer = nextRound?.players[matchIndex] ?? null; const liveMatch = findLiveMatch(liveGameEntries, player1, player2); + const displayPlayer1 = liveMatch?.player1 ?? player1; + const displayPlayer2 = liveMatch?.player2 ?? player2; const hasAdvancedPastRound = roundIndex < rounds.length - 1 && !displayRounds[roundIndex + 1]?.projected; @@ -879,8 +883,8 @@ function buildKnockoutBracket( key: `${roundIndex}-${matchIndex}-${player1 ?? "tbd"}-${player2 ?? "tbd"}`, roundIndex, matchIndex, - player1, - player2, + player1: displayPlayer1, + player2: displayPlayer2, winner, currentTurnColor: winner ? null diff --git a/connect4-ui/components/Celebration.tsx b/connect4-ui/components/Celebration.tsx index 4e01938..61b5f01 100644 --- a/connect4-ui/components/Celebration.tsx +++ b/connect4-ui/components/Celebration.tsx @@ -57,7 +57,7 @@ export default function Celebration() { {winner}
- Dominated the bracket and closed out the tournament. + Dominated and closed out the tournament.