feat: improve tournament workflows and prune outdated docs
This commit is contained in:
1 parent
da7b502936
commit
38a89b5374
53 files changed
+3308
-3276
No files matched your search
@@ -23,6 +23,10 @@ export function DoubleEliminationMobileBracket({
|
||||
projection.series.map((series) => [series.seriesId, series]),
|
||||
);
|
||||
const nodeById = new Map(layout.nodes.map((node) => [node.seriesId, node]));
|
||||
const isCurrentRound = (seriesIds: readonly SeriesId[]) => seriesIds.some((seriesId) => {
|
||||
const status = seriesById.get(seriesId)?.status;
|
||||
return status === "ready" || status === "in-progress";
|
||||
});
|
||||
const sections = [
|
||||
{
|
||||
key: "upper",
|
||||
@@ -71,20 +75,20 @@ export function DoubleEliminationMobileBracket({
|
||||
{section.description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="space-y-5">
|
||||
<div className="space-y-2">
|
||||
{groups.map((group) => (
|
||||
<section
|
||||
<details
|
||||
key={`${group.stage}:${group.roundNumber}`}
|
||||
aria-labelledby={`${bracketId}-${group.stage}-${group.roundNumber}`}
|
||||
open={groups.length === 1 || isCurrentRound(group.seriesIds)}
|
||||
className="group lts-panel"
|
||||
>
|
||||
<h4
|
||||
id={`${bracketId}-${group.stage}-${group.roundNumber}`}
|
||||
className="mb-2 text-xs font-bold text-content-muted"
|
||||
aria-label={group.accessibleLabel}
|
||||
<summary
|
||||
className="cursor-pointer px-3 py-3 text-sm font-semibold hover:bg-sunken"
|
||||
>
|
||||
{group.label}
|
||||
</h4>
|
||||
<div className="space-y-3">
|
||||
{group.accessibleLabel}
|
||||
<span className="ml-2 text-xs font-medium text-content-muted">{group.seriesIds.length}경기</span>
|
||||
</summary>
|
||||
<div className="space-y-3 border-t border-line p-3">
|
||||
{group.seriesIds.map((seriesId) => {
|
||||
const series = seriesById.get(seriesId);
|
||||
if (!series) return null;
|
||||
@@ -113,7 +117,7 @@ export function DoubleEliminationMobileBracket({
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
</details>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in new issue
Block a user