diff options
| author | Adam Soltys <[email protected]> | 2024-11-27 10:25:36 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-27 10:25:40 -0800 |
| commit | c1098927eddb6c9c5beac8420e5cf48edc526731 (patch) | |
| tree | a335c2b515ed44f13ec6528f4223b488ff368edb /src | |
| parent | 1bfd9780998dbab04e0b2cdbf7e82da39336489d (diff) | |
| download | coinos-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.svelte | 7 |
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> |
