use top search results

This commit is contained in:
Hailey
2024-06-12 14:05:12 -07:00
parent 8595572d47
commit 86b1afe483
2 changed files with 10 additions and 16 deletions
+3
View File
@@ -9,9 +9,11 @@ export const RQKEY = (query: string) => [RQKEY_ROOT, query]
export function useActorSearch({
query,
limit = 20,
enabled,
}: {
query: string
limit?: number
enabled?: boolean
}) {
const agent = useAgent()
@@ -21,6 +23,7 @@ export function useActorSearch({
async queryFn() {
const res = await agent.searchActors({
q: query,
limit,
})
return res.data.actors
},