fix: consecutive tournaments, changed some language
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user