Skip to content

Commit

Permalink
show more market days if only one season
Browse files Browse the repository at this point in the history
  • Loading branch information
merklejerk committed Jun 17, 2024
1 parent 77afb04 commit 2d7cc54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/components/contest-progress.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@
</h3>
<div class="tournaments">
{#if tournamentsBySeason[szn.idx]?.length}
{#each tournamentsBySeason[szn.idx].slice().sort((a, b) => cmpDate(b.time, a.time)).slice(0, maxTournaments) as t, j (j)}
{#each tournamentsBySeason[szn.idx]
.slice()
.sort((a, b) => cmpDate(b.time, a.time))
.slice(0, Math.max(maxTournaments, $seasons.length > 1 ? maxTournaments : 8)) as t, j (j)}
<div class="entry">
<h3>
<a href={`${base}/tournament?season=${szn.idx + 1}&id=${t.id}`}>
Expand Down

0 comments on commit 2d7cc54

Please sign in to comment.