From fd2633fd52ce2532d5f291bf202571341bf4b19d Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Mon, 12 Aug 2024 16:12:16 -0400 Subject: [PATCH] remove context code --- src/components/EditMatch.svelte | 5 ++--- src/routes/events/[slug]/+page.svelte | 12 ++++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/EditMatch.svelte b/src/components/EditMatch.svelte index ff7253b..4d6c0fe 100644 --- a/src/components/EditMatch.svelte +++ b/src/components/EditMatch.svelte @@ -6,11 +6,10 @@ import type { Brackets } from '$lib/brackets/brackets.svelte'; import type { Teams } from '$lib/teams.svelte'; import { error } from '@sveltejs/kit'; - import { getContext } from 'svelte'; import type { Pool } from '$lib/pool/pool.svelte'; - let { matchId, matches }: { matchId: number; matches: Pool | Brackets } = $props(); - const teams = getContext('teams') as Teams; + let { matchId, matches, teams }: { matchId: number; matches: Pool | Brackets; teams: Teams } = + $props(); let match = $derived(matches?.matches?.find((m) => m.id === matchId)); diff --git a/src/routes/events/[slug]/+page.svelte b/src/routes/events/[slug]/+page.svelte index 5780c0f..9d2f4a1 100644 --- a/src/routes/events/[slug]/+page.svelte +++ b/src/routes/events/[slug]/+page.svelte @@ -52,10 +52,18 @@ {#if $page.state.type === 'pool'} {#if data.matches} - + {/if} {:else if data.bracket} - + {/if}