diff options
| author | Adam Soltys <[email protected]> | 2024-11-07 21:16:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 09:27:40 -0800 |
| commit | 32fcc461cd43c8907df5e306d520bb671307eab1 (patch) | |
| tree | 0253780c569998b6c1a5f43026586e94916c3fee /src/components/Balance.svelte | |
| parent | be5aa52cea1d57c875cfb22d25c6a866b8de2239 (diff) | |
| download | coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.tar.gz coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.zip | |
svelte 5
Diffstat (limited to 'src/components/Balance.svelte')
| -rw-r--r-- | src/components/Balance.svelte | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte index 0cc27068..91463f7e 100644 --- a/src/components/Balance.svelte +++ b/src/components/Balance.svelte @@ -1,12 +1,14 @@ <script> + import { preventDefault } from 'svelte/legacy'; + import Icon from "$comp/Icon.svelte"; import Pin from "$comp/Pin.svelte"; import { f, s, sat, sats } from "$lib/utils"; import { pin } from "$lib/store"; import { t } from "$lib/translations"; - let show; - export let user, rate, balance; + let show = $state(); + let { user, rate, balance } = $props(); </script> {#if show && user.haspin && $pin?.length !== 6} @@ -16,7 +18,7 @@ <div> {#if user.haspin && !$pin} <button - on:click|preventDefault={() => (show = true)} + onclick={preventDefault(() => (show = true))} class="flex gap-2 text-xl" > <Icon icon="eye-off" style="w-8 my-auto" /> |
