Just filter dupes

This commit is contained in:
Eric Bailey
2024-06-24 11:18:46 -05:00
parent 795f94c3d8
commit 70fab1daf5
+1 -6
View File
@@ -251,11 +251,8 @@ export function useGetPopularFeedsQuery(options?: GetPopularFeedsOptions) {
return { return {
...data, ...data,
pages: data.pages.map(page => { pages: data.pages.map(page => {
let __tempHasDuplicatesStopPagination__ = false
const feeds = page.feeds.filter(feed => { const feeds = page.feeds.filter(feed => {
if (seen.has(feed.uri)) { if (seen.has(feed.uri)) {
__tempHasDuplicatesStopPagination__ = true
return false return false
} }
seen.add(feed.uri) seen.add(feed.uri)
@@ -275,9 +272,7 @@ export function useGetPopularFeedsQuery(options?: GetPopularFeedsOptions) {
return { return {
...page, ...page,
cursor: __tempHasDuplicatesStopPagination__ cursor: page.cursor,
? undefined
: page.cursor,
feeds, feeds,
} }
}), }),