Skip to content

Commit

Permalink
rounds start at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
craigkai committed Aug 19, 2024
1 parent a887bd0 commit 427fa08
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Matches.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@
</div>

{#if rounds > 0}
{#each Array(rounds) as _, i}
{@const round = i + 1}
<div class="flex w-full rounded {i % 2 ? 'bg-gray-100 dark:bg-gray-500' : ''}">
{#each Array(rounds) as _, round}
<div class="flex w-full rounded {round % 2 ? 'bg-gray-100 dark:bg-gray-500' : ''}">
{#each Array(data.tournament.courts) as _, court}
{@const match = data.matches.matches.find(
(m: MatchRow) => m?.court === court && m?.round.toString() === round?.toString()
Expand Down

0 comments on commit 427fa08

Please sign in to comment.