De-closure my-blocked-accounts

This commit is contained in:
Paul Frazee
2023-11-28 16:53:26 -08:00
parent fedec8809d
commit 371b8d9355
+7 -5
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,
initialPageParam: undefined,
getNextPageParam: lastPage => lastPage.cursor,
})
}
async function myBlockedAccountsQueryFn({pageParam}: {pageParam: RQPageParam}) {
const res = await getAgent().app.bsky.graph.getBlocks({ const res = await getAgent().app.bsky.graph.getBlocks({
limit: 30, limit: 30,
cursor: pageParam, cursor: pageParam,
}) })
return res.data return res.data
},
initialPageParam: undefined,
getNextPageParam: lastPage => lastPage.cursor,
})
} }