feat: improve mention search results
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user