aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-26 12:29:52 -0800
committerAdam Soltys <[email protected]>2025-02-26 12:29:52 -0800
commit66b5069777414d2f1e70b8a0804d7712e09b8304 (patch)
tree6060a8075a8c7aea9c868fcd843195d9c84a7299 /src
parent30170344d9b460e70d3816d6b77c5b1d94110f6a (diff)
downloadcoinos-ui-66b5069777414d2f1e70b8a0804d7712e09b8304.tar.gz
coinos-ui-66b5069777414d2f1e70b8a0804d7712e09b8304.zip
app payments page
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/apps/[pubkey]/payments/+page.server.ts6
-rw-r--r--src/routes/(app)/apps/[pubkey]/payments/+page.svelte20
2 files changed, 26 insertions, 0 deletions
diff --git a/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts b/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts
new file mode 100644
index 00000000..546dacdf
--- /dev/null
+++ b/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts
@@ -0,0 +1,6 @@
+import { auth, get } from "$lib/utils";
+
+export const load = async ({ cookies, params }) => {
+ const app = await get(`/app/${params.pubkey}`, auth(cookies));
+ return { app };
+};
diff --git a/src/routes/(app)/apps/[pubkey]/payments/+page.svelte b/src/routes/(app)/apps/[pubkey]/payments/+page.svelte
new file mode 100644
index 00000000..1feda3b3
--- /dev/null
+++ b/src/routes/(app)/apps/[pubkey]/payments/+page.svelte
@@ -0,0 +1,20 @@
+<script>
+ import { loc } from "$lib/utils";
+ import Payments from "$comp/Payments.svelte";
+ import { t } from "$lib/translations";
+
+ let { data } = $props();
+ let { app, user } = $derived(data);
+ let locale = loc(user);
+ let { payments } = $derived(app);
+</script>
+
+<div class="space-y-5">
+ <h1 class="text-center text-3xl md:text-4xl font-semibold">
+ {$t("payments.header")}
+ </h1>
+
+ <div class="container w-full mx-auto text-lg px-2 max-w-xl space-y-2">
+ <Payments {payments} {locale} {user} />
+ </div>
+</div>