From 4a70d87f97d76d51496bf7ee42ca7b0e957725a7 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 11 Jan 2026 15:25:52 +0200 Subject: [PATCH] Fix banning phase showing after match completion (#2712) Co-authored-by: Claude --- app/features/tournament-bracket/components/StartedMatch.tsx | 1 + app/features/tournament-bracket/core/PickBan.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/app/features/tournament-bracket/components/StartedMatch.tsx b/app/features/tournament-bracket/components/StartedMatch.tsx index 7df81ffe7..69f062440 100644 --- a/app/features/tournament-bracket/components/StartedMatch.tsx +++ b/app/features/tournament-bracket/components/StartedMatch.tsx @@ -313,6 +313,7 @@ function FancyStageBanner({ }; const inBanPhase = + !data.matchIsOver && data.match.roundMaps?.pickBan === "BAN_2" && data.mapList && data.mapList.filter((m) => m.bannedByTournamentTeamId).length < 2; diff --git a/app/features/tournament-bracket/core/PickBan.ts b/app/features/tournament-bracket/core/PickBan.ts index 9f9ce5dd1..ea2bafd6a 100644 --- a/app/features/tournament-bracket/core/PickBan.ts +++ b/app/features/tournament-bracket/core/PickBan.ts @@ -35,6 +35,12 @@ export function turnOf({ switch (maps.pickBan) { case "BAN_2": { + if ( + isSetOverByResults({ count: maps.count, results, countType: maps.type }) + ) { + return null; + } + // typically lower seed is the "bottom team" and they pick first const [secondPicker, firstPicker] = teams;