mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
fix(community): import queries via .svelte path; type DetailView reaction filter
- Views import '../queries.svelte' (not '../queries') so module resolution finds the renamed file. - DetailView's filter callbacks need an explicit string param-type under the stricter implicit-any check — myReactions is string[]. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4081ce6346
commit
b064e8e51e
3 changed files with 5 additions and 5 deletions
|
|
@ -5,7 +5,7 @@
|
|||
-->
|
||||
<script lang="ts">
|
||||
import type { PublicFeedbackItem, ReactionEmoji } from '@mana/feedback';
|
||||
import { useCommunityItem } from '../queries';
|
||||
import { useCommunityItem } from '../queries.svelte';
|
||||
import ItemCard from '../components/ItemCard.svelte';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
import { feedbackService } from '$lib/api/feedback';
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
if (view.item && view.item.id === _id) {
|
||||
const myReactions = res.userHasReacted
|
||||
? Array.from(new Set([...(view.item.myReactions ?? []), emoji]))
|
||||
: (view.item.myReactions ?? []).filter((e) => e !== emoji);
|
||||
: (view.item.myReactions ?? []).filter((e: string) => e !== emoji);
|
||||
view.item.reactions = res.reactions;
|
||||
view.item.score = res.score;
|
||||
view.item.myReactions = myReactions;
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
const old = view.replies[idx];
|
||||
const myReactions = res.userHasReacted
|
||||
? Array.from(new Set([...(old.myReactions ?? []), emoji]))
|
||||
: (old.myReactions ?? []).filter((e) => e !== emoji);
|
||||
: (old.myReactions ?? []).filter((e: string) => e !== emoji);
|
||||
view.replies[idx] = {
|
||||
...old,
|
||||
reactions: res.reactions,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { FEEDBACK_CATEGORY_LABELS, type FeedbackCategory } from '@mana/feedback';
|
||||
import { useCommunityFeed, toggleReactionOnItem } from '../queries';
|
||||
import { useCommunityFeed, toggleReactionOnItem } from '../queries.svelte';
|
||||
import ItemCard from '../components/ItemCard.svelte';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import type { FeedbackStatus, PublicFeedbackItem } from '@mana/feedback';
|
||||
import { useCommunityFeed, toggleReactionOnItem } from '../queries';
|
||||
import { useCommunityFeed, toggleReactionOnItem } from '../queries.svelte';
|
||||
import ItemCard from '../components/ItemCard.svelte';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue