From eee30792b3f9843da5d343fa3b169ec66a61e73f Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 28 Nov 2023 17:01:57 -0800 Subject: [PATCH] De-closure my-muted-accounts --- src/state/queries/my-muted-accounts.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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 +}