aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-06 22:52:49 -0800
committerAdam Soltys <[email protected]>2026-03-06 22:52:49 -0800
commit7a4a59b044026f139ecfb144d1e24664d0f6f4cc (patch)
tree6d2fa134b10665f141fba3c6cdc7f514791821e7 /src/components
parentdeba11267523c29237bca31d1deb5a0e6b659810 (diff)
downloadcoinos-ui-7a4a59b044026f139ecfb144d1e24664d0f6f4cc.tar.gz
coinos-ui-7a4a59b044026f139ecfb144d1e24664d0f6f4cc.zip
remove all svelte/legacy usage (run, preventDefault)
Replace run() with $effect(), preventDefault() wrapper with inline e.preventDefault(), and remove unused imports across 13 files. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Account.svelte1
-rw-r--r--src/components/ItemForm.svelte4
-rw-r--r--src/components/Lnurlp.svelte2
-rw-r--r--src/components/LocaleSelector.svelte2
4 files changed, 1 insertions, 8 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte
index 2d4b1e48..068afd0c 100644
--- a/src/components/Account.svelte
+++ b/src/components/Account.svelte
@@ -5,7 +5,6 @@
import PhHandCoinsBold from "virtual:icons/ph/hand-coins-bold";
import PhPaperPlaneRightBold from "virtual:icons/ph/paper-plane-right-bold";
import { bytesToHex } from "@noble/hashes/utils.js";
- import { run } from "svelte/legacy";
import { onMount } from "svelte";
import { goto } from "$app/navigation";
import Balance from "$comp/Balance.svelte";
diff --git a/src/components/ItemForm.svelte b/src/components/ItemForm.svelte
index a64cb7ee..3003597d 100644
--- a/src/components/ItemForm.svelte
+++ b/src/components/ItemForm.svelte
@@ -1,6 +1,4 @@
<script lang="ts">
- import { preventDefault } from "svelte/legacy";
-
import { t } from "$lib/translations";
import { upload } from "$lib/upload";
import { fail } from "$lib/utils";
@@ -72,7 +70,7 @@
<form
method="POST"
class="space-y-5"
- onsubmit={preventDefault(handleSubmit)}
+ onsubmit={(e) => { e.preventDefault(); handleSubmit(); }}
bind:this={formElement}
>
<input type="hidden" name="id" bind:value={item.id} />
diff --git a/src/components/Lnurlp.svelte b/src/components/Lnurlp.svelte
index e613b957..d2e7720e 100644
--- a/src/components/Lnurlp.svelte
+++ b/src/components/Lnurlp.svelte
@@ -1,6 +1,4 @@
<script lang="ts">
- import { run } from "svelte/legacy";
-
import { t } from "$lib/translations";
import { enhance } from "$app/forms";
import Numpad from "$comp/Numpad.svelte";
diff --git a/src/components/LocaleSelector.svelte b/src/components/LocaleSelector.svelte
index 135c8d79..44c254d4 100644
--- a/src/components/LocaleSelector.svelte
+++ b/src/components/LocaleSelector.svelte
@@ -1,6 +1,4 @@
<script lang="ts">
- import { run } from "svelte/legacy";
-
import { t, locale, locales } from "$lib/translations";
let { style = "" }: any = $props();
let l = $state($locale);