diff options
| author | Adam Soltys <[email protected]> | 2023-02-02 23:26:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-02 23:26:34 -0800 |
| commit | 01333bb3f33da6b2c51e910c0fe74637a8c8e24e (patch) | |
| tree | af238aebeab67adb0cf8f4cf9037b42270809b44 /src/components/Balance.svelte | |
| parent | 43d893ff0195f14cd1fcb8acec17b7ca20ff6c28 (diff) | |
| download | coinos-ui-01333bb3f33da6b2c51e910c0fe74637a8c8e24e.tar.gz coinos-ui-01333bb3f33da6b2c51e910c0fe74637a8c8e24e.zip | |
move invoices, combine profile and dashboard
Diffstat (limited to 'src/components/Balance.svelte')
| -rw-r--r-- | src/components/Balance.svelte | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte new file mode 100644 index 00000000..5d72bd45 --- /dev/null +++ b/src/components/Balance.svelte @@ -0,0 +1,19 @@ +<script> + import { f, s, sat, sats } from '$lib/utils'; + import { animatedRate } from '$lib/store'; + import { t } from '$lib/translations'; + + export let user; +</script> + +<div class="space-y-2"> + <div class="text-5xl font-bold tabular-nums"> + {$animatedRate + ? f((user.balance * $animatedRate) / sats, user.currency) + : $t('user.dashboard.fetchingRate')} + </div> + + <div class="text-secondary text-2xl"> + ⚡️{s(user.balance)} + </div> +</div> |
