aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Success.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Success.svelte')
-rw-r--r--src/components/Success.svelte12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/Success.svelte b/src/components/Success.svelte
index 20557f9f..6a0e8eae 100644
--- a/src/components/Success.svelte
+++ b/src/components/Success.svelte
@@ -2,9 +2,9 @@
import { browser } from "$app/environment";
import { scale } from "svelte/transition";
import Amount from "$comp/Amount.svelte";
- const { amount, tip, rate, currency, locale, title } = $props();
+ const { amount, tip = undefined, rate, currency, locale, title = "" }: any = $props();
- let ConfettiComp = $state(null);
+ let ConfettiComp: any = $state(null);
let loaded = $state(false);
$effect(() => {
if (browser)
@@ -13,10 +13,12 @@
});
});
- $effect(async () => {
+ $effect(() => {
if (!browser || !loaded || ConfettiComp) return;
- const mod = await import("svelte-confetti");
- ConfettiComp = mod.Confetti;
+ (async () => {
+ const mod = await import("svelte-confetti");
+ ConfettiComp = mod.Confetti;
+ })();
});
</script>