diff options
| author | Adam Soltys <[email protected]> | 2024-11-08 22:59:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 22:59:39 -0800 |
| commit | c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf (patch) | |
| tree | a65c0df68fcf47d3d97877e43b8d6a5c244bf654 | |
| parent | 9fb49a6a61239ac30d6b85befc4f33a5f3469611 (diff) | |
| download | coinos-ui-c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf.tar.gz coinos-ui-c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf.zip | |
fix invoice variables
| -rw-r--r-- | src/app.css | 4 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 18 |
2 files changed, 8 insertions, 14 deletions
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, ); |
