From 1d2e90a183fd9f9ea61840771eb82c649f0d6d8d Mon Sep 17 00:00:00 2001 From: Casey Timm Date: Sun, 27 Jul 2025 08:40:38 -0400 Subject: [PATCH] Fixed thinking we are on login screen when really loading dashboard --- src/lib/united.js | 5 +++++ src/routes/+layout.svelte | 10 +++++++++- src/routes/+page.svelte | 3 --- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/lib/united.js b/src/lib/united.js index 46709af..46456f7 100644 --- a/src/lib/united.js +++ b/src/lib/united.js @@ -42,10 +42,15 @@ export async function pullData(amount = 100) { state.push('Navigating to United FCU'); await page.goto('https://online.unitedfcu.com/unitedfederalcredituniononline/uux.aspx#/login'); state.push(`Current URL: ${page.url()}`); + await new Promise((resolve) => setTimeout(resolve, 5000)); if (page.url().includes('interstitial')) { await page.waitForLoadState(); } + while (page.url().includes('interstitial')) { + await new Promise((resolve) => setTimeout(resolve, 1000)); + await page.waitForLoadState(); + } if (!page.url().includes('dashboard')) { state.push('Logging in to United FCU'); diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f966772..657366b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,6 +1,12 @@ - + + {@html webManifestLink} +
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 103b912..aa5987b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -10,8 +10,6 @@ let budgetTransactions = $derived(data.budgetTransactions); let last30days = $derived(data.last30DaysTransactionsSums.reverse()); - $inspect(last30days); - let chartData = $derived( last30days.reduce( (acc, curr) => [...acc, acc[acc.length - 1] + Number(curr.sum)], @@ -19,7 +17,6 @@ ) ); - $inspect(chartData); let chartDates = $derived([ 'now', ...last30days.map((day) => `${day.date.getMonth() + 1}/${day.date.getDate()}`)