This commit is contained in:
2026-06-23 03:09:54 +01:00
parent 5288f8293e
commit 1c02c51387
+29 -8
View File
@@ -5319,16 +5319,26 @@ function TournamentStandings({ standings }) {
) )
} }
function TournamentMatchList({ sides, navigate }) { function TournamentListSide({ side, navigate }) {
const [collapsed, setCollapsed] = useState(false)
return ( return (
<div className="bracket-side">
<button
aria-expanded={!collapsed}
className="mb-3 flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-fury-violet transition hover:text-text"
onClick={() => setCollapsed((v) => !v)}
type="button"
>
{side.label}
<span aria-hidden="true" className={`bracket-caret${collapsed ? ' is-collapsed' : ''}`}></span>
</button>
{collapsed ? null : (
<div className="space-y-6"> <div className="space-y-6">
{sides.map((side) => { {side.columns.map((column) => (
const matches = side.columns.flatMap((column) => column.matches) <div key={column.id}>
return ( <p className="mb-3 text-xs font-semibold uppercase tracking-wide text-text-muted">{column.label}</p>
<div key={side.key}>
<h3 className="mb-3 text-sm font-semibold uppercase tracking-wide text-fury-cyan">{side.label}</h3>
<div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3"> <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
{matches.map((match) => ( {column.matches.map((match) => (
<TournamentMatchCard <TournamentMatchCard
key={`${match.type_bracket}-${match.match_id}`} key={`${match.type_bracket}-${match.match_id}`}
match={match} match={match}
@@ -5337,8 +5347,19 @@ function TournamentMatchList({ sides, navigate }) {
))} ))}
</div> </div>
</div> </div>
))}
</div>
)}
</div>
) )
})} }
function TournamentMatchList({ sides, navigate }) {
return (
<div className="space-y-6">
{sides.map((side) => (
<TournamentListSide key={side.key} side={side} navigate={navigate} />
))}
</div> </div>
) )
} }