fix(manacore/web): fix getTagsByIds missing allTags param in zitare, fix TagDragData cast

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-03 14:20:34 +02:00
parent 09eef96ed8
commit e17d6228e4
2 changed files with 7 additions and 3 deletions

View file

@ -12,7 +12,7 @@
import { Heart } from '@manacore/shared-icons';
import { dropTarget } from '@manacore/shared-ui/dnd';
import type { TagDragData } from '@manacore/shared-ui/dnd';
import { getTagsByIds } from '$lib/stores/tags.svelte';
import { useAllTags, getTagsByIds } from '$lib/stores/tags.svelte';
import type { ViewProps } from '$lib/app-registry';
import type { LocalFavorite } from './types';
import type { Quote } from '@zitare/content';
@ -45,8 +45,10 @@
let currentFav = $derived(quote ? favorites.find((f) => f.quoteId === quote!.id) : undefined);
let isFav = $derived(!!currentFav);
const tagsQuery = useAllTags();
let allTags = $derived(tagsQuery.value ?? []);
let currentTagIds = $derived(currentFav?.tagIds ?? []);
let currentTags = $derived(getTagsByIds(currentTagIds));
let currentTags = $derived(getTagsByIds(allTags, currentTagIds));
function nextQuote() {
quotesStore.loadRandomQuote();