aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ItemForm.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
committerAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
commit56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 (patch)
treed6bc2557c56b93177bb14aa376847c6e123a4862 /src/components/ItemForm.svelte
parent13466248004327e9a026cb89f94926f9b060d1c1 (diff)
downloadcoinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.tar.gz
coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.zip
format
Diffstat (limited to 'src/components/ItemForm.svelte')
-rw-r--r--src/components/ItemForm.svelte15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/components/ItemForm.svelte b/src/components/ItemForm.svelte
index 7215a239..a64cb7ee 100644
--- a/src/components/ItemForm.svelte
+++ b/src/components/ItemForm.svelte
@@ -17,10 +17,7 @@
let src: string | undefined = $state();
let tooLarge: Record<string, boolean> = {};
- let handleFile = async (
- { target }: { target: EventTarget | null },
- type: string,
- ) => {
+ let handleFile = async ({ target }: { target: EventTarget | null }, type: string) => {
tooLarge[type] = false;
file = (target as HTMLInputElement).files![0];
if (!file) return;
@@ -42,9 +39,7 @@
if (src) {
try {
- let { hash } = JSON.parse(
- (await upload(file, "item", progress)) as string,
- );
+ let { hash } = JSON.parse((await upload(file, "item", progress)) as string);
data.set("image", hash);
@@ -91,11 +86,7 @@
<div>
<label for="price" class="font-bold mb-1 block">{$t("items.price")}</label>
<div class="flex">
- <input
- name="price"
- bind:value={item.price}
- class="border-r-none rounded-r-none"
- />
+ <input name="price" bind:value={item.price} class="border-r-none rounded-r-none" />
<div
class="text-gray-600 rounded-r-2xl p-4 my-auto rounded-l-none rounded border bg-gray-100"
>