aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/payment
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-02 23:37:57 -0800
committerAdam Soltys <[email protected]>2026-03-02 23:37:57 -0800
commit68684395a080a834d823b39e2e9641372bbafbfd (patch)
treed9a02ed31ef3be0fe7c274b08597271e7dac8f15 /src/routes/(app)/payment
parent97fffca3e63e2edb4818305abdbcbb8953344aa3 (diff)
downloadcoinos-ui-68684395a080a834d823b39e2e9641372bbafbfd.tar.gz
coinos-ui-68684395a080a834d823b39e2e9641372bbafbfd.zip
dependency audit
Diffstat (limited to 'src/routes/(app)/payment')
-rw-r--r--src/routes/(app)/payment/[id]/+page.svelte7
-rw-r--r--src/routes/(app)/payment/[id]/plain/+page.svelte5
2 files changed, 4 insertions, 8 deletions
diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte
index 55daca8d..3e8c4788 100644
--- a/src/routes/(app)/payment/[id]/+page.svelte
+++ b/src/routes/(app)/payment/[id]/+page.svelte
@@ -5,7 +5,7 @@
import { browser } from "$app/environment";
import { onMount, tick } from "svelte";
import { t, loading } from "$lib/translations";
- import { copy, f, s, loc, toFiat, post, sats, fail, success, types } from "$lib/utils";
+ import { copy, f, s, loc, toFiat, post, sats, fail, success, types, formatDate } from "$lib/utils";
import { fiat } from "$lib/store";
const toggleFiat = (e) => {
@@ -14,9 +14,7 @@
$fiat = !$fiat;
};
import Avatar from "$comp/Avatar.svelte";
- import { format } from "date-fns";
import { PUBLIC_EXPLORER, PUBLIC_LIQUID_EXPLORER } from "$env/static/public";
- import locales from "$lib/locales";
import { goto } from "$app/navigation";
let expanded: Set<string> = $state(new Set());
@@ -24,7 +22,6 @@
let { data } = $props();
let user = $derived(data.user);
let p = $derived(data.payment);
- let locale = $derived(user ? locales[user.language] : locales["en"]);
let userLocale = $derived(loc(user));
let {
@@ -192,7 +189,7 @@
</span>
</button>
<div class="text-secondary">
- {format(new Date(created), "MMM d, yyyy", { locale })}<span class="mx-3">{format(new Date(created), "h:mmaaa", { locale })}</span>
+ {formatDate(new Date(created), user?.language, { month: "short", day: "numeric", year: "numeric" })}<span class="mx-3">{formatDate(new Date(created), user?.language, { hour: "numeric", minute: "2-digit" })}</span>
</div>
</div>
diff --git a/src/routes/(app)/payment/[id]/plain/+page.svelte b/src/routes/(app)/payment/[id]/plain/+page.svelte
index 1efe2c32..d92ab58f 100644
--- a/src/routes/(app)/payment/[id]/plain/+page.svelte
+++ b/src/routes/(app)/payment/[id]/plain/+page.svelte
@@ -3,10 +3,9 @@
import { onMount } from "svelte";
import { browser } from "$app/environment";
import { t } from "$lib/translations";
- import { back, copy, f, s, toFiat, post, sats, success, types } from "$lib/utils";
+ import { back, copy, f, s, toFiat, post, sats, success, types, formatDate } from "$lib/utils";
import { fiat } from "$lib/store";
import Avatar from "$comp/Avatar.svelte";
- import { format } from "date-fns";
import { PUBLIC_EXPLORER as expl } from "$env/static/public";
let { data } = $props();
@@ -66,7 +65,7 @@
<div>
<span class="text-lg text-secondary">Date</span>
- <div>{format(new Date(created), "MMMM d")}, {format(new Date(created), "h:mm aaa")}</div>
+ <div>{formatDate(new Date(created), "en", { month: "long", day: "numeric" })}, {formatDate(new Date(created), "en", { hour: "numeric", minute: "2-digit" })}</div>
</div>
{#if type === "bitcoin"}