about summary refs log tree commit diff
path: root/src/state/queries/my-muted-accounts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries/my-muted-accounts.ts')
-rw-r--r--src/state/queries/my-muted-accounts.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/state/queries/my-muted-accounts.ts b/src/state/queries/my-muted-accounts.ts
index c46474b27..1d686637a 100644
--- a/src/state/queries/my-muted-accounts.ts
+++ b/src/state/queries/my-muted-accounts.ts
@@ -1,14 +1,13 @@
 import {AppBskyGraphGetMutes} from '@atproto/api'
 import {useInfiniteQuery, InfiniteData, QueryKey} from '@tanstack/react-query'
 
-import {useSession} from '#/state/session'
+import {getAgent} from '#/state/session'
 import {STALE} from '#/state/queries'
 
 export const RQKEY = () => ['my-muted-accounts']
 type RQPageParam = string | undefined
 
 export function useMyMutedAccountsQuery() {
-  const {agent} = useSession()
   return useInfiniteQuery<
     AppBskyGraphGetMutes.OutputSchema,
     Error,
@@ -19,7 +18,7 @@ export function useMyMutedAccountsQuery() {
     staleTime: STALE.MINUTES.ONE,
     queryKey: RQKEY(),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
-      const res = await agent.app.bsky.graph.getMutes({
+      const res = await getAgent().app.bsky.graph.getMutes({
         limit: 30,
         cursor: pageParam,
       })