aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-26 13:55:33 -0800
committerAdam Soltys <[email protected]>2024-12-26 13:55:33 -0800
commitdacbd16c4373a9a16ef2db38a7765a0e207134da (patch)
tree2eafb84fea10bea51c636a98302621ce16e667ea /src
parent3c0489e1cca4f6a211215b700489d256695c3ce1 (diff)
downloadcoinos-ui-dacbd16c4373a9a16ef2db38a7765a0e207134da.tar.gz
coinos-ui-dacbd16c4373a9a16ef2db38a7765a0e207134da.zip
bolt 12 type
Diffstat (limited to 'src')
-rw-r--r--src/components/Payments.svelte2
-rw-r--r--src/routes/(app)/invoices/+page.server.ts7
-rw-r--r--src/routes/(app)/invoices/+page.svelte9
3 files changed, 17 insertions, 1 deletions
diff --git a/src/components/Payments.svelte b/src/components/Payments.svelte
index 2d38513e..fdc6ea03 100644
--- a/src/components/Payments.svelte
+++ b/src/components/Payments.svelte
@@ -76,7 +76,7 @@
</div>
{:else}
<div class="text-secondary flex items-center gap-1">
- {#if p.type === types.lightning}
+ {#if p.type === types.lightning || p.types === types.bolt12}
<iconify-icon
icon="ph:lightning-fill"
class="text-yellow-300 text-3xl"
diff --git a/src/routes/(app)/invoices/+page.server.ts b/src/routes/(app)/invoices/+page.server.ts
new file mode 100644
index 00000000..081d6a5b
--- /dev/null
+++ b/src/routes/(app)/invoices/+page.server.ts
@@ -0,0 +1,7 @@
+import { auth, get } from "$lib/utils";
+
+export async function load({ cookies }) {
+ const invoices = await get("/invoices", auth(cookies));
+ console.log(invoices.length)
+ return { invoices };
+}
diff --git a/src/routes/(app)/invoices/+page.svelte b/src/routes/(app)/invoices/+page.svelte
new file mode 100644
index 00000000..ffbc550e
--- /dev/null
+++ b/src/routes/(app)/invoices/+page.svelte
@@ -0,0 +1,9 @@
+<script>
+ let { data } = $props();
+ let { invoices } = $derived(data);
+</script>
+
+{invoices.length}
+{#each invoices as i}
+ {JSON.stringify(i)}
+{/each}