From c2f12cb450ec4fdf827909a611e717172828826f Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sun, 2 Feb 2025 22:33:17 +0100 Subject: [PATCH] bugfixing --- src/routes/profile/+page.svelte | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/routes/profile/+page.svelte b/src/routes/profile/+page.svelte index a681769e..1833ef6c 100644 --- a/src/routes/profile/+page.svelte +++ b/src/routes/profile/+page.svelte @@ -15,6 +15,8 @@ export let form; let pwaInstalled; + let loading = false; + let nottifPermGranted: boolean | null = null; let isPushSubscribed = data?.getPushSubscriptionData !== null ? true : false; @@ -181,6 +183,7 @@ } async function handlePushSubscribe() { + loading = true; const output = await subscribeUser(); console.log(output); if (output?.success === true) { @@ -195,6 +198,7 @@ "border-radius: 5px; background: #fff; color: #000; border-color: #4B5563; font-size: 15px;", }); } + loading = false; } @@ -275,12 +279,22 @@ stock news, and earnings calls delivered straight to your device.

- + {#if !loading} + + {:else} + + {/if} {/if} {:else if nottifPermGranted === false}