aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/send/user
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/send/user')
-rw-r--r--src/routes/send/user/[username]/+page.svelte11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/routes/send/user/[username]/+page.svelte b/src/routes/send/user/[username]/+page.svelte
index f200827f..1193696b 100644
--- a/src/routes/send/user/[username]/+page.svelte
+++ b/src/routes/send/user/[username]/+page.svelte
@@ -26,6 +26,9 @@
if (amount) amount = undefined;
else back();
};
+
+ let loading;
+ let submit = () => (loading = true);
</script>
<button class="ml-5 md:ml-20 mt-5 md:mt-10 hover:opacity-80" on:click={handleBack}>
@@ -50,7 +53,7 @@
<Numpad bind:amount={a} bind:amountFiat={af} {currency} bind:fiat />
{/if}
- <form method="POST" use:enhance>
+ <form method="POST" use:enhance on:submit={submit}>
<input name="amount" value={amount} type="hidden" />
<input name="username" value={recipient.username} type="hidden" />
<input name="confirmed" value={form?.confirm} type="hidden" />
@@ -61,7 +64,11 @@
type="submit"
class="opacity-100 hover:opacity-80'} rounded-2xl border py-3 font-bold mx-auto mt-2 bg-black text-white px-4 w-24"
>
- Send
+ {#if loading}
+ <Spinner />
+ {:else}
+ Send
+ {/if}
</button>
{:else}
<button