From c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 8 Nov 2024 22:59:34 -0800 Subject: fix invoice variables --- src/app.css | 4 ++-- src/routes/(app)/invoice/[id]/+page.svelte | 18 ++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/app.css b/src/app.css index 364668b6..86dcc94c 100644 --- a/src/app.css +++ b/src/app.css @@ -41,7 +41,7 @@ input, textarea, select, .input { @apply w-full rounded-2xl; } -textarea:focus, textarea:focus-within, .input:focus, .input:focus-within, .btn:focus, .btn:focus-within { +textarea:focus, textarea:focus-within, .input:focus, .input:focus-within { @apply outline-offset-0; } @@ -55,5 +55,5 @@ input.clean { } .btn { - @apply rounded-2xl btn-lg btn-block + @apply rounded-2xl btn-lg btn-block outline-none } diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index 29684703..c87d972b 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -26,18 +26,11 @@ let readingerror = (e) => console.log("nfc error", e); - let { invoice, id, subject, user } = $state(data); - let src = $derived(data.src); - let { - aid, - amount, - hash, - type, - rate, - text, - tip, - user: { username, currency }, - } = $state(invoice); + let { id, subject, user } = $state(data); + let { invoice, src } = $derived(data); + let { hash, text } = $derived(invoice); + let { aid, amount, type, rate, tip } = $state(invoice); + let { username, currency } = invoice.user; let tipPercent = $derived(tip ? (tip / amount) * 100 : 0); @@ -102,6 +95,7 @@ let link = $derived( [types.bitcoin, types.liquid].includes(type) ? text : `lightning:${text}`, ); + let txt = $derived( [types.bitcoin, types.liquid].includes(type) ? hash : text, ); -- cgit v1.2.3