feat: improve mention search results
This commit is contained in:
parent
faa7298f89
commit
699f3a792d
5 changed files with 47 additions and 8 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { SEARCHABLE_RELAY_URLS } from '@/constants'
|
||||
import { useFeed } from '@/providers/FeedProvider'
|
||||
import client from '@/services/client.service'
|
||||
import { TProfile } from '@/types'
|
||||
|
|
@ -22,13 +21,7 @@ export function useSearchProfiles(search: string, limit: number) {
|
|||
setIsFetching(true)
|
||||
setProfiles([])
|
||||
try {
|
||||
const profiles = await client.fetchProfiles(
|
||||
searchableRelayUrls.concat(SEARCHABLE_RELAY_URLS).slice(0, 4),
|
||||
{
|
||||
search,
|
||||
limit
|
||||
}
|
||||
)
|
||||
const profiles = await client.searchProfilesFromIndex(search)
|
||||
if (profiles) {
|
||||
setProfiles(profiles)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue