fix(mobile): remove prefetching of entry translations
- Removed `usePrefetchEntryTranslation` calls from `EntryGridFooter`, `EntryNormalItem`, and `EntrySocialItem` components to optimize performance and reduce unnecessary data fetching. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ import { EntryDetailScreen } from "@/src/screens/(stack)/entries/[entryId]"
|
||||
import { useEntry } from "@/src/store/entry/hooks"
|
||||
import { getInboxFrom } from "@/src/store/entry/utils"
|
||||
import { useFeed } from "@/src/store/feed/hooks"
|
||||
import { useEntryTranslation, usePrefetchEntryTranslation } from "@/src/store/translation/hooks"
|
||||
import { useEntryTranslation } from "@/src/store/translation/hooks"
|
||||
|
||||
import { EntryItemContextMenu } from "../../context-menu/entry"
|
||||
import { EntryItemSkeleton } from "../EntryListContentArticle"
|
||||
@@ -33,7 +33,6 @@ import { EntryTranslation } from "./EntryTranslation"
|
||||
|
||||
export function EntryNormalItem({ entryId, extraData }: { entryId: string; extraData: string }) {
|
||||
const entry = useEntry(entryId)
|
||||
usePrefetchEntryTranslation(entryId)
|
||||
const translation = useEntryTranslation(entryId)
|
||||
const from = getInboxFrom(entry)
|
||||
const feed = useFeed(entry?.feedId as string)
|
||||
|
||||
@@ -19,7 +19,7 @@ import { EntryDetailScreen } from "@/src/screens/(stack)/entries/[entryId]"
|
||||
import { FeedScreen } from "@/src/screens/(stack)/feeds/[feedId]"
|
||||
import { useEntry } from "@/src/store/entry/hooks"
|
||||
import { useFeed } from "@/src/store/feed/hooks"
|
||||
import { useEntryTranslation, usePrefetchEntryTranslation } from "@/src/store/translation/hooks"
|
||||
import { useEntryTranslation } from "@/src/store/translation/hooks"
|
||||
import { unreadSyncService } from "@/src/store/unread/store"
|
||||
|
||||
import { EntryItemContextMenu } from "../../context-menu/entry"
|
||||
@@ -28,7 +28,6 @@ import { EntryTranslation } from "./EntryTranslation"
|
||||
|
||||
export function EntrySocialItem({ entryId }: { entryId: string }) {
|
||||
const entry = useEntry(entryId)
|
||||
usePrefetchEntryTranslation(entryId)
|
||||
const translation = useEntryTranslation(entryId)
|
||||
|
||||
const feed = useFeed(entry?.feedId || "")
|
||||
|
||||
Reference in New Issue
Block a user