aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/sent
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-13 23:49:59 -0800
committerAdam Soltys <[email protected]>2023-01-13 23:49:59 -0800
commitb1ad12734eeafc36a07bd76f649a98ae9ade5723 (patch)
treec8721da657a75160c55aaf6bc7cc573669cb52dd /src/routes/(app)/sent
parent277b921ab2a97ac170f980c3c916ab1488318f2f (diff)
downloadcoinos-ui-b1ad12734eeafc36a07bd76f649a98ae9ade5723.tar.gz
coinos-ui-b1ad12734eeafc36a07bd76f649a98ae9ade5723.zip
payments migration
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.svelte8
2 files changed, 10 insertions, 4 deletions
diff --git a/src/routes/(app)/sent/+page.server.js b/src/routes/(app)/sent/+page.server.js
new file mode 100644
index 00000000..fb35e367
--- /dev/null
+++ b/src/routes/(app)/sent/+page.server.js
@@ -0,0 +1,6 @@
+import { get, auth } from '$lib/utils';
+
+export let load = async ({ cookies }) => {
+ 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 047efc86..2168a517 100644
--- a/src/routes/(app)/sent/+page.svelte
+++ b/src/routes/(app)/sent/+page.svelte
@@ -6,9 +6,9 @@
import { t } from '$lib/translations';
export let data;
- let { user } = data;
+ let { payments, user } = data;
- let payment = user.payments[0];
+ let payment = payments[0]
let { amount, rate } = payment;
amount = Math.abs(amount);
@@ -28,8 +28,8 @@
<h3 class="text-secondary md:text-lg mb-6 mt-1">{sat(amount)}</h3>
</div>
-<a href={`/${user.username}/transactions`}>
+<a href={`/${user.username}/payments`}>
<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('transactions.tapAnywhere')}</div>
+<div class="fixed bottom-10 w-full text-center">{$t('payments.tapAnywhere')}</div>