aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/sent
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-06 20:33:45 -0800
committerAdam Soltys <[email protected]>2023-12-06 20:33:45 -0800
commit6b3ff247e4125941a611369ed9bb74a2ffca57d8 (patch)
tree91da939350398188834e5e002bc78011a2a8e5bf /src/routes/(app)/sent
parentbb59ac3e4e7fcbf7f8a48820eab0ee21558183fc (diff)
parentd69c34cf389639eac82d24d1f1b02f038ef42399 (diff)
downloadcoinos-ui-6b3ff247e4125941a611369ed9bb74a2ffca57d8.tar.gz
coinos-ui-6b3ff247e4125941a611369ed9bb74a2ffca57d8.zip
Merge branch 'master' into swapee
Diffstat (limited to 'src/routes/(app)/sent')
-rw-r--r--src/routes/(app)/sent/+page.server.js6
-rw-r--r--src/routes/(app)/sent/+page.svelte73
2 files changed, 42 insertions, 37 deletions
diff --git a/src/routes/(app)/sent/+page.server.js b/src/routes/(app)/sent/+page.server.js
index 381ff32f..62a4d9b4 100644
--- a/src/routes/(app)/sent/+page.server.js
+++ b/src/routes/(app)/sent/+page.server.js
@@ -1,6 +1,6 @@
-import { get, auth } from '$lib/utils';
+import { get, auth } from "$lib/utils";
export let load = async ({ cookies }) => {
- let { payments } = await get('/payments', auth(cookies));
- return { payments };
+ let { payments } = await get("/payments", auth(cookies));
+ return { payments };
};
diff --git a/src/routes/(app)/sent/+page.svelte b/src/routes/(app)/sent/+page.svelte
index dbd18c2e..e2d297de 100644
--- a/src/routes/(app)/sent/+page.svelte
+++ b/src/routes/(app)/sent/+page.svelte
@@ -1,47 +1,52 @@
<script>
- import { fiat, f, s, sat, sats } from '$lib/utils';
- import { scale } from 'svelte/transition';
- import { Icon } from '$comp';
- import { toast } from '@zerodevx/svelte-toast';
- import { t } from '$lib/translations';
+ import { fiat, f, s, sat, sats } from "$lib/utils";
+ import { scale } from "svelte/transition";
+ import Icon from "$comp/Icon.svelte";
+ import { toast } from "@zerodevx/svelte-toast";
+ import { t } from "$lib/translations";
- export let data;
- let { payments, user } = data;
- let { currency, username } = user;
+ export let data;
+ let { payments, user } = data;
+ let { currency, username } = user;
- let payment = payments[0];
- let { amount, rate, tip } = payment;
- amount = Math.abs(amount);
+ let payment = payments[0];
+ let { amount, rate, tip } = payment;
+ amount = Math.abs(amount);
- toast.pop(0);
+ toast.pop(0);
</script>
<div class="text-center mt-20 md:mt-0">
- <div class="flex w-full max-w-[200px] mx-auto py-20" in:scale={{ start: 0.5 }}>
- <Icon icon="check" style="mx-auto" />
- </div>
- <h1 class="text-3xl md:text-4xl font-bold mb-6">{$t('payments.sent')}!</h1>
- <h2 class="text-2xl md:text-3xl font-semibold">
- {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">
- ⚡️{s(amount)}
+ <div
+ class="flex w-full max-w-[200px] mx-auto py-20"
+ in:scale={{ start: 0.5 }}
+ >
+ <Icon icon="check" style="mx-auto" />
+ </div>
+ <h1 class="text-3xl md:text-4xl font-bold mb-6">{$t("payments.sent")}!</h1>
+ <h2 class="text-2xl md:text-3xl font-semibold">
+ {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">
+ ⚡️{s(amount)}
- {#if tip}
- <span class="text-lg">
- + ⚡️{s(tip)}
- </span>
- {/if}
- </h3>
+ {#if tip}
+ <span class="text-lg">
+ + ⚡️{s(tip)}
+ </span>
+ {/if}
+ </h3>
</div>
<a href={`/${username}/payments`}>
- <div class="opacity-0 w-screen h-screen fixed top-0 left-0 z-50" />
+ <div class="opacity-0 w-screen h-screen fixed top-0 left-0 z-50" />
</a>
-<div class="fixed bottom-10 w-full text-center">{$t('payments.tapAnywhere')}</div>
+<div class="fixed bottom-10 w-full text-center">
+ {$t("payments.tapAnywhere")}
+</div>