From f28d139db0ad9935e4d847f23d0a27c4d1970671 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sun, 19 Jan 2025 23:02:46 +0000 Subject: [PATCH] remove extra useless map --- src/screens/VideoFeed/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 2b248a9738..5537655bcd 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -193,16 +193,14 @@ function Feed() { usePostFeedQuery( feedDesc, params.type === 'feedgen' && params.sourceInterstitial !== 'none' - ? { - feedCacheKey: params.sourceInterstitial, - } + ? {feedCacheKey: params.sourceInterstitial} : undefined, ) const videos = useMemo(() => { let vids = data?.pages - .map(page => { + .flatMap(page => { const items: { _reactKey: string moderation: ModerationDecision @@ -221,7 +219,6 @@ function Feed() { } return items }) - .flatMap(items => items) .filter(item => AppBskyEmbedVideo.isView(item.post.embed)) || [] const startingVideoIndex = vids?.findIndex(video => { return video.post.uri === params.initialPostUri