Fix multiple starting bracket formats incorrectly saying waiting for teams from a previous bracket
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle 2025-12-06 21:11:13 +02:00
parent ae02a4efc5
commit 234a5e7275
2 changed files with 6 additions and 1 deletions

View File

@ -275,6 +275,11 @@ export abstract class Bracket {
return;
}
/** Returns true if this bracket is a starting bracket (i.e., teams in it start their tournament from this bracket). Note: there can be more than one starting bracket. */
get isStartingBracket() {
return !this.sources || this.sources.length === 0;
}
protected standingsWithoutNonParticipants(standings: Standing[]): Standing[] {
return standings.map((standing) => {
return {

View File

@ -205,7 +205,7 @@ export default function TournamentBracketsPage() {
{!bracket.canBeStarted ? (
<div className="tournament-bracket__mini-alert">
{" "}
{bracketIdx === 0
{bracket.isStartingBracket
? "Tournament start time is in the future"
: bracket.startTime && bracket.startTime > new Date()
? "Bracket start time is in the future"