aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Image.svelte
blob: dcd9d3ff7002927fa9180c96fdbfe5b1d4c246a2 (plain) (blame)
1
2
3
4
5
6
<script>
	export let image;
	export let style;
</script>

<img src="/images/{image}.webp" alt={image} class={style} />
eger.Long */
<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">
		{#if isNaN($animatedRate)}
			<div class="text-gray-200">&mdash;</div>
		{:else}
			{f((user.balance * $animatedRate) / sats, user.currency)}
		{/if}
	</div>

	<div class="text-secondary text-2xl">
		⚡️{s(user.balance)}
	</div>
</div>