mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:01:08 +02:00
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:
parent
09eef96ed8
commit
e17d6228e4
2 changed files with 7 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@
|
|||
const OFFSET_Y = -20;
|
||||
|
||||
const tagData = $derived(
|
||||
dragState.activeDrag?.type === 'tag' ? (dragState.activeDrag.data as TagDragData) : null
|
||||
dragState.activeDrag?.type === 'tag'
|
||||
? (dragState.activeDrag.data as unknown as TagDragData)
|
||||
: null
|
||||
);
|
||||
|
||||
const entityData = $derived(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue