Remove old Suggested Follows logic (#3689)

This commit is contained in:
dan 2024-04-24 17:45:11 +01:00 committed by GitHub
parent 8ec3d8c76e
commit e2a59449df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 87 deletions

View file

@ -1,4 +1,3 @@
import React from 'react'
import {
AppBskyActorDefs,
AppBskyActorGetSuggestions,
@ -11,7 +10,6 @@ import {
QueryKey,
useInfiniteQuery,
useQuery,
useQueryClient,
} from '@tanstack/react-query'
import {STALE} from '#/state/queries'
@ -90,29 +88,6 @@ export function useSuggestedFollowsByActorQuery({did}: {did: string}) {
})
}
export function useGetSuggestedFollowersByActor() {
const queryClient = useQueryClient()
return React.useCallback(
async (actor: string) => {
const res = await queryClient.fetchQuery({
staleTime: STALE.MINUTES.ONE,
queryKey: suggestedFollowsByActorQueryKey(actor),
queryFn: async () => {
const res =
await getAgent().app.bsky.graph.getSuggestedFollowsByActor({
actor: actor,
})
return res.data
},
})
return res
},
[queryClient],
)
}
export function* findAllProfilesInQueryData(
queryClient: QueryClient,
did: string,