chore(web): switch to writable derived one more place (#17399)

This commit is contained in:
Ben McCann 2025-04-06 20:05:47 -07:00 committed by GitHub
parent b58a450152
commit 31ee19181a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,11 +44,7 @@
$effect(() => void assetStore.updateOptions({ deferInit: !tag, tagId }));
onDestroy(() => assetStore.destroy());
let tags = $state<TagResponseDto[]>([]);
$effect(() => {
tags = data.tags;
});
let tags = $derived<TagResponseDto[]>(data.tags);
let tagsMap = $derived(buildMap(tags));
let tag = $derived(currentPath ? tagsMap[currentPath] : null);
let tagId = $derived(tag?.id);