migrate: switch run() to $effect

This commit is contained in:
Xylight committed 2024-10-26 11:13:00 -07:00
1 parent 1b4bb96003
commit c75e0cc4b7
4 files changed
+16 -11

No files matched your search

+5 -2
View File
@@ -22,6 +22,7 @@
let sort = $state(data.sort)
$effect(() => {
if (type) settings.defaultSort.feed = type
if (sort) settings.defaultSort.sort = sort
})
@@ -39,8 +40,10 @@
{#snippet extended()}
<div class="flex items-center gap-2">
<Location bind:selected={type} />
<Sort bind:selected={sort} />
{#if type}
<Location navigate bind:selected={type} />
{/if}
<Sort navigate bind:selected={sort} />
<ViewSelect />
</div>
{/snippet}