De-closure my-blocked-accounts

This commit is contained in:
Paul Frazee
2023-11-28 16:53:26 -08:00
parent fedec8809d
commit 371b8d9355
+9 -7
View File
@@ -17,14 +17,16 @@ export function useMyBlockedAccountsQuery() {
>({ >({
staleTime: STALE.MINUTES.ONE, staleTime: STALE.MINUTES.ONE,
queryKey: RQKEY(), queryKey: RQKEY(),
async queryFn({pageParam}: {pageParam: RQPageParam}) { queryFn: myBlockedAccountsQueryFn,
const res = await getAgent().app.bsky.graph.getBlocks({
limit: 30,
cursor: pageParam,
})
return res.data
},
initialPageParam: undefined, initialPageParam: undefined,
getNextPageParam: lastPage => lastPage.cursor, getNextPageParam: lastPage => lastPage.cursor,
}) })
} }
async function myBlockedAccountsQueryFn({pageParam}: {pageParam: RQPageParam}) {
const res = await getAgent().app.bsky.graph.getBlocks({
limit: 30,
cursor: pageParam,
})
return res.data
}