aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-27 10:25:36 -0800
committerAdam Soltys <[email protected]>2024-11-27 10:25:40 -0800
commitc1098927eddb6c9c5beac8420e5cf48edc526731 (patch)
treea335c2b515ed44f13ec6528f4223b488ff368edb /src
parent1bfd9780998dbab04e0b2cdbf7e82da39336489d (diff)
downloadcoinos-ui-c1098927eddb6c9c5beac8420e5cf48edc526731.tar.gz
coinos-ui-c1098927eddb6c9c5beac8420e5cf48edc526731.zip
use derived state in layout
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/[username]/(profile)/+layout.svelte7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte
index 87997529..f6a9edae 100644
--- a/src/routes/(app)/[username]/(profile)/+layout.svelte
+++ b/src/routes/(app)/[username]/(profile)/+layout.svelte
@@ -22,9 +22,9 @@
follows,
followers,
followList,
- } = $state(data);
+ } = $derived(data);
- let { currency, npub, username: n, display } = $state(subject);
+ let { currency, npub, username: n, display } = $derived(subject);
let list = $state([]);
let follow = async () => {
@@ -287,7 +287,8 @@
<iconify-icon icon="ph:lightning-fill" class="text-yellow-300"
></iconify-icon>
{s((1 * sats) / rates[currency])} =
- {f(1, currency)} {currency}
+ {f(1, currency)}
+ {currency}
</div>
</div>
</div>