diff --git a/src/state/queries/my-muted-accounts.ts b/src/state/queries/my-muted-accounts.ts index 1d686637af..0c35418ce3 100644 --- a/src/state/queries/my-muted-accounts.ts +++ b/src/state/queries/my-muted-accounts.ts @@ -17,14 +17,16 @@ export function useMyMutedAccountsQuery() { >({ staleTime: STALE.MINUTES.ONE, queryKey: RQKEY(), - async queryFn({pageParam}: {pageParam: RQPageParam}) { - const res = await getAgent().app.bsky.graph.getMutes({ - limit: 30, - cursor: pageParam, - }) - return res.data - }, + queryFn, initialPageParam: undefined, getNextPageParam: lastPage => lastPage.cursor, }) } + +async function queryFn({pageParam}: {pageParam: RQPageParam}) { + const res = await getAgent().app.bsky.graph.getMutes({ + limit: 30, + cursor: pageParam, + }) + return res.data +}