Skip to content

Commit

Permalink
If fallback, return nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Sep 9, 2024
1 parent 723a5e4 commit 6b5335e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/state/queries/suggested-follows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ export function useSuggestedFollowsQuery(options?: SuggestedFollowsOptions) {
export function useSuggestedFollowsByActorQuery({did}: {did: string}) {
const agent = useAgent()
return useQuery<AppBskyGraphGetSuggestedFollowsByActor.OutputSchema, Error>({
gcTime: 0,
gcTime: 0, // TODO
queryKey: suggestedFollowsByActorQueryKey(did),
queryFn: async () => {
const res = await agent.app.bsky.graph.getSuggestedFollowsByActor({
actor: did,
})
return res.data
return res.data.isFallback ? {suggestions: []} : res.data
},
})
}
Expand Down

0 comments on commit 6b5335e

Please sign in to comment.