From bfe39f20c1e422dbd1df605313e60bc3e30cb949 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 28 Nov 2024 23:00:55 +0200 Subject: [PATCH] Bracket map list dialog display "Tiebreaker" text when appropriate --- app/db/seed/index.ts | 1 + .../components/BracketMapListDialog.tsx | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/db/seed/index.ts b/app/db/seed/index.ts index c091d3270..8c2e0e35d 100644 --- a/app/db/seed/index.ts +++ b/app/db/seed/index.ts @@ -1085,6 +1085,7 @@ function calendarEventWithToToolsTieBreakerMapPool() { for (const tieBreakerCalendarEventId of [ TO_TOOLS_CALENDAR_EVENT_ID, // PICNIC TO_TOOLS_CALENDAR_EVENT_ID + 2, // Paddling Pool + TO_TOOLS_CALENDAR_EVENT_ID + 4, // The Depths ]) { for (const { mode, stageId } of tiebreakerPicks.stageModePairs) { sql diff --git a/app/features/tournament-bracket/components/BracketMapListDialog.tsx b/app/features/tournament-bracket/components/BracketMapListDialog.tsx index 35d51f358..9f531375e 100644 --- a/app/features/tournament-bracket/components/BracketMapListDialog.tsx +++ b/app/features/tournament-bracket/components/BracketMapListDialog.tsx @@ -740,6 +740,7 @@ function RoundMapList({ }) { const id = React.useId(); const [editing, setEditing] = React.useState(false); + const tournament = useTournament(); return (
@@ -806,12 +807,16 @@ function RoundMapList({ } const isTeamsPick = !maps.list && i === 0; + const isLast = i === maps.count - 1; return ( ); })} @@ -888,9 +893,11 @@ function MapListRow({ function MysteryRow({ number, isCounterpicks, + isTiebreaker, }: { number: number; isCounterpicks: boolean; + isTiebreaker: boolean; }) { return (
  • @@ -900,7 +907,13 @@ function MysteryRow({ })} > {number}. - {isCounterpicks ? <>Counterpick : <>Team's pick} + {isCounterpicks ? ( + <>Counterpick + ) : isTiebreaker ? ( + <>Tiebreaker + ) : ( + <>Team's pick + )}
  • );