Skip to content

Commit

Permalink
fix tournament + match titles more
Browse files Browse the repository at this point in the history
  • Loading branch information
merklejerk committed Jun 18, 2024
1 parent 44f2f8c commit 66c05c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/routes/(app)/match/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@
tournamentId = params.get('tournament') ?? undefined;
seasonIdx = Number(params.get('season') ?? '1') - 1;
bracketIdx = Number(params.get('bracket') ?? '1') - 1;
matchIdx = Number(params.get('idx') ?? '1') - 1;
matchIdx = Number(params.get('idx') ?? NaN);
if (isNaN(matchIdx)) {
matchIdx = undefined;
} else {
matchIdx -= 1;
}
matchId = params.get('match') ?? undefined;
}
Expand Down
5 changes: 4 additions & 1 deletion src/routes/(app)/tournament/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ import { page } from "$app/stores";
function parseQueryParams(params: URLSearchParams): void {
tournamentId = params.get('id') ?? undefined;
seasonIdx = Number(params.get('season') ?? '1') - 1;
tournamentIdx = Number(params.get('idx') ?? '1') - 1;
tournamentIdx = Number(params.get('idx') ?? NaN);
console.log(tournamentIdx);
if (isNaN(tournamentIdx)) {
tournamentIdx = undefined;
} else {
tournamentIdx -= 1;
}
}
</script>
Expand Down

0 comments on commit 66c05c9

Please sign in to comment.