aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Tools/FollowFix.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-28 15:32:46 -0700
committerFuwn <[email protected]>2024-10-28 15:32:46 -0700
commit39b677404558ae3b7eb34e818d7ca308f62f9cb0 (patch)
tree7f19fca39ecd4237e3c0d1aef2d8e9fa3cec7845 /src/lib/Tools/FollowFix.svelte
parentfeat(graphql): paged badges query (diff)
downloaddue.moe-svelte-5.tar.xz
due.moe-svelte-5.zip
feat: update to svelte 5svelte-5
Diffstat (limited to 'src/lib/Tools/FollowFix.svelte')
-rw-r--r--src/lib/Tools/FollowFix.svelte16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/Tools/FollowFix.svelte b/src/lib/Tools/FollowFix.svelte
index b9fddeff..411b1a92 100644
--- a/src/lib/Tools/FollowFix.svelte
+++ b/src/lib/Tools/FollowFix.svelte
@@ -3,23 +3,27 @@
import type { AniListAuthorisation } from '$lib/Data/AniList/identity';
import LogInRestricted from '$lib/Error/LogInRestricted.svelte';
- export let user: AniListAuthorisation;
+ interface Props {
+ user: AniListAuthorisation;
+ }
- let input = '';
- let submit = '';
+ let { user }: Props = $props();
+
+ let input = $state('');
+ let submit = $state('');
</script>
{#if user === undefined}
<LogInRestricted />
{:else}
<p>
- <!-- svelte-ignore missing-declaration -->
+ <!-- svelte-ignore missing_declaration -->
<input
type="text"
minlength="1"
placeholder="Username"
bind:value={input}
- on:keypress={(e) => {
+ onkeypress={(e) => {
if (e.key === 'Enter') {
submit = input;
@@ -28,7 +32,7 @@
}
}}
/>
- <a href={'#'} on:click={() => (submit = input)}>
+ <a href={'#'} onclick={() => (submit = input)}>
Toggle follow for {input.length === 0 ? '...' : input}
</a>
</p>