fix: use untrack() in \$state initialisers to silence state_referenced_locally warnings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 11:31:51 +01:00
parent b9b98f178f
commit edee98b552
13 changed files with 57 additions and 45 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import { untrack } from "svelte";
import { _ } from "svelte-i18n";
import { goto } from "$app/navigation";
import { page } from "$app/state";
@@ -17,7 +18,7 @@
const timeAgo = new TimeAgo("en");
const { data } = $props();
let searchValue = $state(data.search ?? "");
let searchValue = $state(untrack(() => data.search ?? ""));
$effect(() => {
searchValue = data.search ?? "";
});