diff options
| author | Adam Soltys <[email protected]> | 2024-11-28 14:02:31 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-28 14:02:31 -0800 |
| commit | 67e26efeb6f0c7cc2d4dfbd91f30ff0a158991e6 (patch) | |
| tree | ffa25df2bc3a4fdb9ffaa64fa52f0567ed8a6f00 /src/components/Balance.svelte | |
| parent | 132e6003a42d2dcd39a8786648b4c652d888cd97 (diff) | |
| download | coinos-ui-67e26efeb6f0c7cc2d4dfbd91f30ff0a158991e6.tar.gz coinos-ui-67e26efeb6f0c7cc2d4dfbd91f30ff0a158991e6.zip | |
number formatting
Diffstat (limited to 'src/components/Balance.svelte')
| -rw-r--r-- | src/components/Balance.svelte | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte index 33597c18..28bd69b3 100644 --- a/src/components/Balance.svelte +++ b/src/components/Balance.svelte @@ -6,6 +6,7 @@ let show = $state(); let { user, rate, balance } = $props(); + let locale = loc(user); let toggleShow = (e) => { e.preventDefault(); e.stopPropagation(); @@ -27,14 +28,14 @@ <div class="text-4xl font-bold flex items-center"> <iconify-icon icon="ph:lightning-fill" width="32" class="text-yellow-300" ></iconify-icon> - {s(balance)} + {s(balance, locale)} </div> <div class="text-secondary text-xl"> {#if isNaN(rate)} <div class="text-gray-200">—</div> {:else} - {f(toFiat(balance, rate), user.currency, loc(user))} + {f(toFiat(balance, rate), user.currency, locale)} {/if} </div> {/if} |
