fix: entries in external feed page

This commit is contained in:
DIYgod
2024-07-26 00:10:33 +08:00
parent a3e24e7a3d
commit 26e4f3d474
2 changed files with 8 additions and 8 deletions
@@ -31,7 +31,7 @@ export function ListItem({
(s) => s.feedId === FEED_COLLECTION_LIST,
)
const feed = useFeedById(entry?.feedId)
const feed = useFeedById(entry?.feedId) || entryPreview?.feeds
// NOTE: prevent 0 height element, react virtuoso will not stop render any more
if (!entry || !feed) return <ReactVirtuosoItemPlaceholder />
@@ -112,13 +112,13 @@ export function Component() {
>
<ListItemHoverOverlay />
<Item
// entryId=""
// entryPreview={{
// entries: entry,
// // @ts-expect-error
// feeds: feed.data.feed as FeedModel,
// read: true,
// }}
entryPreview={{
entries: entry,
// @ts-expect-error
feeds: feed.data.feed as FeedModel,
read: true,
feedId: feed.data.feed.id!,
}}
entryId={entry.id}
/>
</a>