diff options
| author | secondl1ght <[email protected]> | 2022-07-30 12:59:47 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-07-30 12:59:47 -0600 |
| commit | e599c7dec8b79903b769f957231c67e16dde9bfc (patch) | |
| tree | 320f06c88f8ba267a84c80de948f781302482ec5 /src/routes/receive.svelte | |
| parent | 54962d8d54ea899e0010114939019ba6a18c5515 (diff) | |
| download | coinos-ui-e599c7dec8b79903b769f957231c67e16dde9bfc.tar.gz coinos-ui-e599c7dec8b79903b769f957231c67e16dde9bfc.zip | |
add loading splash, start adding toast messages, qr code skeleton
Diffstat (limited to 'src/routes/receive.svelte')
| -rw-r--r-- | src/routes/receive.svelte | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/routes/receive.svelte b/src/routes/receive.svelte index 760733a3..3ccd45e8 100644 --- a/src/routes/receive.svelte +++ b/src/routes/receive.svelte @@ -1,12 +1,20 @@ <script> // in the future we will want to allow users to set their fiat currency in the settings - import { AppHeader, Icon } from '$comp'; + import { onMount } from 'svelte'; + import { AppHeader, Icon, LoadingSplash } from '$comp'; import { goto } from '$app/navigation'; import { invoiceAmount, invoiceAmountFiat, rate, user } from '$lib/store'; - if (!$user && typeof window !== 'undefined') { - window.location = '/login'; - } + onMount(async () => { + if (browser) { + let { default: toast } = await import('@zerodevx/svelte-toast'); + + if (!$user && typeof window !== 'undefined') { + window.location = '/login'; + toast.push('Please login to continue.'); + } + } + }); let useFiat = true; let amountFiat = 0; @@ -179,4 +187,6 @@ /> {/if} </div> +{:else} + <LoadingSplash /> {/if} |
