about summary refs log tree commit diff
path: root/src/state/queries/search-posts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries/search-posts.ts')
-rw-r--r--src/state/queries/search-posts.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/queries/search-posts.ts b/src/state/queries/search-posts.ts
index b0720af3c..5bee96535 100644
--- a/src/state/queries/search-posts.ts
+++ b/src/state/queries/search-posts.ts
@@ -25,7 +25,7 @@ export function useSearchPostsQuery({
   sort?: 'top' | 'latest'
   enabled?: boolean
 }) {
-  const {getAgent} = useAgent()
+  const agent = useAgent()
   return useInfiniteQuery<
     AppBskyFeedSearchPosts.OutputSchema,
     Error,
@@ -35,7 +35,7 @@ export function useSearchPostsQuery({
   >({
     queryKey: searchPostsQueryKey({query, sort}),
     queryFn: async ({pageParam}) => {
-      const res = await getAgent().app.bsky.feed.searchPosts({
+      const res = await agent.app.bsky.feed.searchPosts({
         q: query,
         limit: 25,
         cursor: pageParam,