From 738b17d82c567059c27a935938fbcc12ab948582 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Tue, 28 May 2024 23:45:12 -0400 Subject: [PATCH] fix season prize not populating in progress component --- src/lib/components/contest-progress.svelte | 7 +++++++ src/routes/player/+page.svelte | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/components/contest-progress.svelte b/src/lib/components/contest-progress.svelte index 4b636e3..64766e7 100644 --- a/src/lib/components/contest-progress.svelte +++ b/src/lib/components/contest-progress.svelte @@ -41,6 +41,13 @@ let loadPageState: BusyState; const loadPageAwait = createBusy(r => loadPageState = r); let seasonData: undefined | Array; + + $: { + if ($season && seasonData?.[$season.idx]) { + seasonData[$season.idx].prize = $season.prize; + } + } + loadPageAwait(async () => { const [seasons, tournaments] = await Promise.all([ fetchOnchainSeasons().catch(() => []), diff --git a/src/routes/player/+page.svelte b/src/routes/player/+page.svelte index e8cf09b..6421b5b 100644 --- a/src/routes/player/+page.svelte +++ b/src/routes/player/+page.svelte @@ -48,7 +48,7 @@ seasonResults: TournamentResult[][]; } | null = null; let isWalletOperator = false; - let playerIsActive: boolean = true; + let playerIsActive: boolean = false; let playerPrize: bigint = 0n; $: isSeasonClosed = $season?.state !== SeasonState.Started;