From 78c201d8d9d2f3ec07f6ea36201977846e29ccd9 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Feb 2026 12:42:42 -0800 Subject: homepage design and currency toggling --- src/components/Payments.svelte | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/components/Payments.svelte') diff --git a/src/components/Payments.svelte b/src/components/Payments.svelte index dd153ec6..16033959 100644 --- a/src/components/Payments.svelte +++ b/src/components/Payments.svelte @@ -5,6 +5,7 @@ import { format } from "date-fns"; import { t } from "$lib/translations"; import locales from "$lib/locales"; + import { fiat } from "$lib/store"; const { fund, locale, user, payments } = $props(); const language = $derived(user?.language || "en"); @@ -24,26 +25,26 @@ >
-
- -
{s(Math.abs(amount), locale)}
+
+ {#if $fiat} +
{f(Math.abs(amount) * (p.rate / sats), p.currency, locale)}
+ {:else} + +
{s(Math.abs(amount), locale)}
+ {/if}
-
- {f(Math.abs(amount) * (p.rate / sats), p.currency, locale)} - - {#if p.tip} - -  +{Math.round((p.tip / Math.abs(amount)) * 100)}% - - {/if} -
+ {#if p.tip} +
+ +{Math.round((p.tip / Math.abs(amount)) * 100)}% +
+ {/if}