aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Account.svelte13
-rw-r--r--src/components/Items.svelte21
2 files changed, 17 insertions, 17 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte
index b3bba3b1..310e5a70 100644
--- a/src/components/Account.svelte
+++ b/src/components/Account.svelte
@@ -11,13 +11,16 @@
let refresh = (a) => ({ seed, balance, id } = a);
let setAccount = () => (document.cookie = `aid=${id}; path=/; max-age=86400`);
+ let go = (url) => {
+ setAccount();
+ goto(url);
+ };
</script>
-<a
- href={`/payments`}
- class="block space-y-2 border-primary py-4"
+<div
+ class="block space-y-2 border-primary py-4 cursor-pointer"
class:border-b-8={!last}
- on:click={setAccount}
+ on:click={() => go("/payments")}
>
<div class="flex">
<Balance {balance} {user} {rate} />
@@ -48,4 +51,4 @@
</button>
</a>
</div>
-</a>
+</div>
diff --git a/src/components/Items.svelte b/src/components/Items.svelte
index 2916721d..db5dedc1 100644
--- a/src/components/Items.svelte
+++ b/src/components/Items.svelte
@@ -135,23 +135,20 @@
{/if}
{#if user?.username === subject.username}
<div class="flex gap-2 justify-center absolute top-2 right-2">
- <button type="button" on:click|stopPropagation={() => {}}>
- <a href={`/items/${i.id}`}>
- <button
- class="bg-black rounded-full w-12 h-12 bg-opacity-40 hover:bg-opacity-100"
- >
- <Icon icon="edit" style="w-8 mx-auto invert" />
- </button>
- </a>
- </button>
+ <a href={`/items/${i.id}`}>
+ <button
+ class="bg-black rounded-full w-12 h-12 bg-opacity-40 hover:bg-opacity-100"
+ >
+ <Icon icon="edit" style="w-8 mx-auto invert" />
+ </button>
+ </a>
<button
class="bg-black rounded-full w-12 h-12 bg-opacity-40 hover:bg-opacity-100"
on:click|stopPropagation={() => del(i)}
>
<Icon icon="trash" style="w-8 mx-auto invert" />
</button>
- <button
- type="button"
+ <div
on:click|stopPropagation={() => {}}
class="sm:hidden"
on:mousedown={startDrag}
@@ -165,7 +162,7 @@
<Icon icon="move" style="w-8 mx-auto invert" />
</button>
</a>
- </button>
+ </div>
</div>
{/if}
</div>