diff options
Diffstat (limited to 'src/state/queries/profile-extra-info.ts')
-rw-r--r-- | src/state/queries/profile-extra-info.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/state/queries/profile-extra-info.ts b/src/state/queries/profile-extra-info.ts index 4e7890e32..8fc32c33e 100644 --- a/src/state/queries/profile-extra-info.ts +++ b/src/state/queries/profile-extra-info.ts @@ -1,6 +1,6 @@ import {useQuery} from '@tanstack/react-query' -import {useSession} from '#/state/session' +import {getAgent} from '#/state/session' import {STALE} from '#/state/queries' // TODO refactor invalidate on mutate? @@ -11,17 +11,16 @@ export const RQKEY = (did: string) => ['profile-extra-info', did] * is not available in the API's ProfileView */ export function useProfileExtraInfoQuery(did: string) { - const {agent} = useSession() return useQuery({ staleTime: STALE.MINUTES.ONE, queryKey: RQKEY(did), async queryFn() { const [listsRes, feedsRes] = await Promise.all([ - agent.app.bsky.graph.getLists({ + getAgent().app.bsky.graph.getLists({ actor: did, limit: 1, }), - agent.app.bsky.feed.getActorFeeds({ + getAgent().app.bsky.feed.getActorFeeds({ actor: did, limit: 1, }), |