diff options
| author | John Barratt <[email protected]> | 2023-03-07 10:29:49 -0800 |
|---|---|---|
| committer | John Barratt <[email protected]> | 2023-03-07 10:29:49 -0800 |
| commit | 8ef9568cd1bd822495ce005d4e4cfaa6cb0d92ce (patch) | |
| tree | 4ea5530cc2b7e5d970dc8a84cacfecfe2cce46b7 /src/routes/(app)/sent | |
| parent | c97fb43abba375920fff361ec5fa4eb64a5a0d3f (diff) | |
| parent | 0f44e3283c25c9783a52cf20957661da49d2f90b (diff) | |
| download | coinos-ui-notifications.tar.gz coinos-ui-notifications.zip | |
Merge branch 'master' of https://github.com/coinos/coinos-ui into notificationsnotifications
Diffstat (limited to 'src/routes/(app)/sent')
| -rw-r--r-- | src/routes/(app)/sent/+page.svelte | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/routes/(app)/sent/+page.svelte b/src/routes/(app)/sent/+page.svelte index 79a0aa6e..760d2e1d 100644 --- a/src/routes/(app)/sent/+page.svelte +++ b/src/routes/(app)/sent/+page.svelte @@ -1,5 +1,5 @@ <script> - import { f, s, sat, sats } from '$lib/utils'; + import { fiat, f, s, sat, sats } from '$lib/utils'; import { scale } from 'svelte/transition'; import { Icon } from '$comp'; import { toast } from '@zerodevx/svelte-toast'; @@ -7,13 +7,12 @@ export let data; let { payments, user } = data; + let { currency, username } = user; let payment = payments[0]; - let { amount, rate } = payment; + let { amount, rate, tip } = payment; amount = Math.abs(amount); - let fiat = (amount * rate) / sats; - toast.pop(0); </script> @@ -23,12 +22,25 @@ </div> <h1 class="text-3xl md:text-4xl font-bold mb-6">Sent!</h1> <h2 class="text-2xl md:text-3xl font-semibold"> - {f(fiat, user.currency)} + {f(fiat(amount, rate), currency)} + {#if tip} + <span class="text-lg"> + + {f(fiat(tip, rate), currency)} + </span> + {/if} </h2> - <h3 class="text-secondary md:text-lg mb-6 mt-1">{sat(amount)}</h3> + <h3 class="text-secondary md:text-lg mb-6 mt-1"> + ⚡️{s(amount)} + + {#if tip} + <span class="text-lg"> + + ⚡️{s(tip)} + </span> + {/if} + </h3> </div> -<a href={`/${user.username}/payments`}> +<a href={`/${username}/payments`}> <div class="opacity-0 w-screen h-screen fixed top-0 left-0 z-50" /> </a> |
