Partial revert, just filter posts to start at index

This commit is contained in:
Eric Bailey
2025-01-16 15:31:42 -06:00
parent 5225558303
commit 3316de975e
4 changed files with 28 additions and 25 deletions
+8 -4
View File
@@ -118,13 +118,17 @@ function YoloFeed() {
hasNextPage,
isFetchingNextPage,
fetchNextPage,
} = usePostFeedQuery(`feedgen|${params.feedUri}`, {
initialCursor: params.cursor,
})
} = usePostFeedQuery(`feedgen|${params.feedUri}`)
const videos = data?.pages.flatMap(page =>
let videos = data?.pages.flatMap(page =>
page.slices.flatMap(slice => slice.items),
)
const startingVideoIndex = videos?.findIndex(video => {
return video.post.uri === params.postUri
})
if (videos && startingVideoIndex && startingVideoIndex > -1) {
videos = videos.slice(startingVideoIndex)
}
const [currentSources, setCurrentSources] = useState<
[string | null, string | null, string | null]