From e294a1793e3e884ed3f6c095f4978ccd44255a16 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 28 Nov 2024 08:20:19 -0800 Subject: handle undefined --- src/routes/(app)/[username]/(profile)/+layout.svelte | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/routes/(app)') diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index 55ea9f2d..2ce8aa7a 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -2,7 +2,18 @@ import { invalidate } from "$app/navigation"; import { browser } from "$app/environment"; import { hexToUint8Array } from "uint8array-extras"; - import { copy, f, get, post, s, sats, success, fail, si } from "$lib/utils"; + import { + copy, + f, + loc, + get, + post, + s, + sats, + success, + fail, + si, + } from "$lib/utils"; import { t } from "$lib/translations"; import { sign, send } from "$lib/nostr"; import { bech32m } from "@scure/base"; @@ -25,6 +36,7 @@ } = $derived(data); let { currency, npub, username: n, display } = $derived(subject); + let locale = loc(user); let list = $state([]); let follow = async () => { @@ -280,14 +292,14 @@
1
Bitcoin -
= {f(rates[currency], currency)}
+
= {f(rates[currency], currency, locale)}
{s((1 * sats) / rates[currency])} = - {f(1, currency)} + {f(1, currency, locale)}
-- cgit v1.2.3