@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user