aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}