aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/pot
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-11-08 13:46:04 -0800
committerAdam Soltys <[email protected]>2023-11-11 00:04:22 -0800
commit8041f705373758940b9487ed5c4cd34bfb04ac16 (patch)
treea96ded4f227e157762d446e8d946a94cae861b0d /src/routes/(app)/send/pot
parent84022507dd5d5a03aedb986f0ff28c81a3bcaeec (diff)
downloadcoinos-ui-8041f705373758940b9487ed5c4cd34bfb04ac16.tar.gz
coinos-ui-8041f705373758940b9487ed5c4cd34bfb04ac16.zip
rename pot to fund
Diffstat (limited to 'src/routes/(app)/send/pot')
-rw-r--r--src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js17
-rw-r--r--src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte58
2 files changed, 0 insertions, 75 deletions
diff --git a/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js b/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js
deleted file mode 100644
index 3f819696..00000000
--- a/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { fail, redirect } from '@sveltejs/kit';
-import { auth, fd, post } from '$lib/utils';
-
-export const actions = {
- default: async ({ cookies, request }) => {
- let body = await fd(request);
- let p;
-
- try {
- p = await post('/payments', body, auth(cookies));
- } catch (e) {
- return fail(400, { message: e.message });
- }
-
- if (p) throw redirect(307, `/pot/${body.name}`);
- }
-};
diff --git a/src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte b/src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte
deleted file mode 100644
index 6aecf8f3..00000000
--- a/src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte
+++ /dev/null
@@ -1,58 +0,0 @@
-<script>
- import { t } from '$lib/translations';
- import { enhance } from '$app/forms';
- import { Icon, Numpad, Spinner } from '$comp';
- import { page } from '$app/stores';
- import { back } from '$lib/utils';
- import { pin } from '$lib/store';
-
- export let data;
- export let form;
-
- let { amount, name } = $page.params;
- let { rates } = data;
- let { currency } = data.user;
- let loading;
-
- $: rate = rates[currency];
-
- let submit = () => (loading = true);
- $: update(form);
- let update = () => {
- if (form?.message?.includes('pin')) $pin = undefined;
- loading = false;
- };
-</script>
-
-<button class="ml-5 md:ml-20 mt-5 md:mt-10 hover:opacity-80" on:click={back}>
- <Icon icon="arrow-left" style="w-10" />
-</button>
-
-{#if form?.message}
- <div class="text-red-600 text-center">
- {form.message}
- </div>
-{/if}
-
-<div class="container px-4 mt-20 max-w-xl mx-auto">
- <Numpad bind:amount {currency} bind:rate />
-
- <form method="POST" use:enhance on:submit={submit}>
- <input name="name" value={name} type="hidden" />
- <input name="amount" value={amount} type="hidden" />
- <input name="pin" value={$pin} type="hidden" />
-
- <div class="flex w-full">
- <button
- 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"
- >
- {#if loading}
- <Spinner />
- {:else}
- {$t('payments.send')}
- {/if}
- </button>
- </div>
- </form>
-</div>