aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-06 21:25:00 -0800
committerAdam Soltys <[email protected]>2023-12-06 21:25:00 -0800
commitb485a1bfc6dbbf43cca8652b2a509f6b4a30c4f4 (patch)
treea9358f70094660abcd651561207a3e0dc2c98d7f /src/routes
parent6b3ff247e4125941a611369ed9bb74a2ffca57d8 (diff)
downloadcoinos-ui-b485a1bfc6dbbf43cca8652b2a509f6b4a30c4f4.tar.gz
coinos-ui-b485a1bfc6dbbf43cca8652b2a509f6b4a30c4f4.zip
merge fixes
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/[username]/(profile)/+layout.svelte6
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte30
2 files changed, 17 insertions, 19 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte
index 32bebe3b..5b3fcfa5 100644
--- a/src/routes/(app)/[username]/(profile)/+layout.svelte
+++ b/src/routes/(app)/[username]/(profile)/+layout.svelte
@@ -12,10 +12,8 @@
let { encode, toWords } = bech32m;
let events, user, subject, src, text;
- let follow = async () => {
- user.follows.push(['p', subject.pubkey, 'wss://nostr.swapee.me', subject.username]);
- update();
- };
+ $: ({ events, user, subject, src, rates, text } = data);
+ $: ({ currency, username: n, display } = subject);
$: username = n.length > 60 ? n.substr(0, 6) : display || n;
$: npub = bech32m.encode(
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte
index 376554b5..e728a336 100644
--- a/src/routes/(app)/[username]/(profile)/+page.svelte
+++ b/src/routes/(app)/[username]/(profile)/+page.svelte
@@ -11,11 +11,11 @@
import { browser } from "$app/environment";
export let data;
- let { messages, notes, invoices, sent, received, subject, user, rates } =
+ let { messages, notes, invoices, sent, received, subject, user, rate, rates } =
data;
$: refresh(data);
let refresh = (d) =>
- ({ messages, notes, invoices, sent, received, subject, user, rates } = d);
+ ({ messages, notes, invoices, sent, received, subject, user, rate, rates } = d);
let keys = new Set();
let latest = [];
@@ -70,7 +70,7 @@
{#if user?.id === subject.id}
<div>
<div class="flex justify-center lg:justify-start mb-8">
- <Balance {user} />
+ <Balance {user} {rate} />
</div>
<div class="space-y-8 mt-8">
{#if !user.balance}
@@ -82,7 +82,7 @@
<div class="flex gap-4 justify-center w-full">
<a href={`/${user.username}/receive`}>
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white"
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white h-14"
>
<div class="mx-auto flex">
<Icon icon="numpad" style="my-auto h-6 mr-2 invert" />
@@ -91,20 +91,20 @@
</button>
</a>
- <a href={`/send`} class="w-full md:w-60">
- <button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-full"
- >
- <div class="mx-auto flex">
- <Icon icon="send" style="my-auto h-6 mr-2" />
- <div class="my-auto">{$t("user.dashboard.send")}</div>
- </div>
- </button>
- </a>
+ <a href={`/send`}>
+ <button
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white h-14"
+ >
+ <div class="mx-auto my-auto flex">
+ <Icon icon="send" style="my-auto h-6 mr-2 invert" />
+ <div class="my-auto">{$t("user.dashboard.send")}</div>
+ </div>
+ </button>
+ </a>
<a href={`/buy`}>
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white"
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white h-14"
>
<div class="mx-auto flex">
<!-- <Icon icon="plus" style="my-auto h-6 mr-2" /> -->