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}