aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-09-13 22:38:27 -0600
committersecondl1ght <[email protected]>2022-09-13 22:38:27 -0600
commit5411633670d040449acc1eb2add3f7af673f94db (patch)
treeade2e6f892d1ae828e1e3faec328a1ec3d56934b /src
parent641ec2105f9de31116c0c2f041e5f9cf9dbfdee8 (diff)
downloadcoinos-ui-5411633670d040449acc1eb2add3f7af673f94db.tar.gz
coinos-ui-5411633670d040449acc1eb2add3f7af673f94db.zip
add success animation to payment screen
Diffstat (limited to 'src')
-rw-r--r--src/routes/invoice/[id]/+page.svelte14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte
index aba892e6..352ac719 100644
--- a/src/routes/invoice/[id]/+page.svelte
+++ b/src/routes/invoice/[id]/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import { LottiePlayer } from '@lottiefiles/svelte-lottie-player';
import { get, post, reverseFormat } from '$lib/utils';
import { browser } from '$app/environment';
import { invoices, user } from '$lib/store';
@@ -324,7 +325,18 @@
</div>
{:else}
<div class="text-center mt-20 md:mt-0">
- <Image image="success" style="w-full md:w-3/4 xl:w-1/2 mx-auto max-w-3xl" />
+ {#if typeof window !== 'undefined'}
+ <div class="w-full mx-auto max-w-xl">
+ <LottiePlayer
+ src="/lottie/success.json"
+ autoplay={true}
+ loop={true}
+ controls={false}
+ renderer="svg"
+ background="transparent"
+ />
+ </div>
+ {/if}
<h1 class="text-3xl md:text-4xl font-bold mb-6">{$t('invoice.paymentSuccessful')}</h1>
<h2 class="text-2xl md:text-3xl font-semibold">
{totalAmountFormatted}