diff options
| author | Adam Soltys <[email protected]> | 2024-11-20 15:07:43 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-20 15:07:43 -0800 |
| commit | e9bd1f4e0593f5e7381892349d8ca9fd5bfec320 (patch) | |
| tree | 0bda1ce1609980bb76b846ce977378f7d5b3b5e7 | |
| parent | 596490878ca5ae2b8a86cb830918789d3af682a5 (diff) | |
| download | coinos-ui-e9bd1f4e0593f5e7381892349d8ca9fd5bfec320.tar.gz coinos-ui-e9bd1f4e0593f5e7381892349d8ca9fd5bfec320.zip | |
fix payment details page
| -rw-r--r-- | src/components/Avatar.svelte | 3 | ||||
| -rw-r--r-- | src/routes/(app)/payment/[id]/+page.svelte | 20 |
2 files changed, 8 insertions, 15 deletions
diff --git a/src/components/Avatar.svelte b/src/components/Avatar.svelte index 467b825e..5b5ce713 100644 --- a/src/components/Avatar.svelte +++ b/src/components/Avatar.svelte @@ -1,8 +1,5 @@ <script lang="ts"> - import { run } from "svelte/legacy"; - import { avatar, banner } from "$lib/store"; - import Icon from "$comp/Icon.svelte"; import { punk } from "$lib/utils"; interface Props { diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index 94226931..6171dce9 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -1,6 +1,4 @@ <script> - import { run } from "svelte/legacy"; - import { browser } from "$app/environment"; import { onMount, tick } from "svelte"; import { t, loading } from "$lib/translations"; @@ -20,12 +18,12 @@ 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 { data } = $props(); let { user, payment: p } = $state(data); - let locale = locales[user.language]; + let locale = user ? locales[user.language] : locales["en"]; - let { username } = user; let { id, hash, @@ -94,16 +92,14 @@ </h1> {#if p.with} - <div> + <div onclick={() => goto(`/${p.with.username}`)}> <span class="text-lg text-secondary my-auto mr-2">{direction}</span> - <a href={`/${p.with.username}`}> - <div class="flex"> - <div class="my-auto"> - <Avatar user={p.with} size={20} /> - </div> - <div class="my-auto ml-1">{p.with.username}</div> + <div class="flex"> + <div class="my-auto"> + <Avatar user={p.with} size={20} /> </div> - </a> + <div class="my-auto ml-1">{p.with.username}</div> + </div> </div> {/if} {#if p.type === types.fund} |
