diff options
| author | Adam Soltys <[email protected]> | 2024-12-12 22:39:47 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-12 22:39:47 -0800 |
| commit | a4aba929eee1f7cad95d1c58eb322175b5e6cfbc (patch) | |
| tree | 64c640dec49e063659506cb45957cb62b26c87a8 /src/routes/(app)/pay | |
| parent | 0916c812a85be30c9ce3935475f435a67857a06b (diff) | |
| download | coinos-ui-a4aba929eee1f7cad95d1c58eb322175b5e6cfbc.tar.gz coinos-ui-a4aba929eee1f7cad95d1c58eb322175b5e6cfbc.zip | |
pass locale around
Diffstat (limited to 'src/routes/(app)/pay')
| -rw-r--r-- | src/routes/(app)/pay/[username]/[...amount]/+page.svelte | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/routes/(app)/pay/[username]/[...amount]/+page.svelte b/src/routes/(app)/pay/[username]/[...amount]/+page.svelte index ab96e7c2..b22e3c1f 100644 --- a/src/routes/(app)/pay/[username]/[...amount]/+page.svelte +++ b/src/routes/(app)/pay/[username]/[...amount]/+page.svelte @@ -1,17 +1,16 @@ <script> - import { run } from "svelte/legacy"; - import { t } from "$lib/translations"; import { goto } from "$app/navigation"; import { enhance } from "$app/forms"; import Numpad from "$comp/Numpad.svelte"; import { page } from "$app/stores"; - import { f, fail, post, s, sat, sats } from "$lib/utils"; + import { f, loc, fail, post, s, sat, sats } from "$lib/utils"; let { data, form } = $props(); let { subject, rate, user } = $state(data); let currency = subject?.currency || "USD"; + let locale = $derived(loc(subject)); let next = $state(); let initialAmount = form?.amount || data.amount; @@ -26,7 +25,7 @@ {/if} <div class="container px-4 mt-20 max-w-xl mx-auto space-y-2"> - <Numpad bind:amount bind:fiat {currency} {rate} submit={next} /> + <Numpad bind:amount bind:fiat {currency} {locale} {rate} submit={next} /> <form method="POST" use:enhance> <input name="amount" value={amount} type="hidden" /> |
