Fix pagination (#11448)

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
rafael
2026-08-27 12:35:38 -03:00
committed by GitHub
parent f298a4ef5e
commit cfd6d1e07e
15 changed files with 363 additions and 122 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ export function ProfileFeedgens({
error,
refetch,
} = useProfileFeedgensQuery(did, opts)
const isEmpty = !isPending && !data?.pages[0]?.feeds.length
const isEmpty = !isPending && !data?.pages.some(page => page.feeds.length)
const {data: preferences} = usePreferencesQuery()
const navigation = useNavigation()
const {currentAccount} = useSession()
+1 -1
View File
@@ -90,7 +90,7 @@ export function ListMembers({
hasNextPage,
isFetchingNextPage,
} = useListMembersQuery(list)
const isEmpty = !isFetching && !data?.pages[0].items.length
const isEmpty = !isFetching && !data?.pages.some(page => page.items.length)
const isOwner =
currentAccount && data?.pages[0].list.creator.did === currentAccount.did
+1 -1
View File
@@ -79,7 +79,7 @@ export function ProfileLists({
error,
refetch,
} = useProfileListsQuery(did, opts)
const isEmpty = !isPending && !data?.pages[0]?.lists.length
const isEmpty = !isPending && !data?.pages.some(page => page.lists.length)
const {data: preferences} = usePreferencesQuery()
const navigation = useNavigation()
const {currentAccount} = useSession()
@@ -36,7 +36,7 @@ export function ModerationBlockedAccounts({}: Props) {
fetchNextPage,
isFetchingNextPage,
} = useMyBlockedAccountsQuery()
const isEmpty = !isFetching && !data?.pages[0]?.blocks.length
const isEmpty = !isFetching && !data?.pages.some(page => page.blocks.length)
const profiles = useMemo(() => {
if (data?.pages) {
return data.pages.flatMap(page => page.blocks)
+1 -1
View File
@@ -36,7 +36,7 @@ export function ModerationMutedAccounts({}: Props) {
fetchNextPage,
isFetchingNextPage,
} = useMyMutedAccountsQuery()
const isEmpty = !isFetching && !data?.pages[0]?.mutes.length
const isEmpty = !isFetching && !data?.pages.some(page => page.mutes.length)
const profiles = useMemo(() => {
if (data?.pages) {
return data.pages.flatMap(page => page.mutes)