Bluesky app fork with some witchin' additions 💫

fix: prevent profile suggestions animation when no data available (#9277)

Prevents AccordionAnimation from animating open on web when suggestions array is empty by adding conditional rendering logic to AnimatedProfileHeaderSuggestedFollows component.

authored by

Caidan and committed by
GitHub
bd5d1028 32bf6cf0

+12 -1
+12 -1
src/screens/Profile/Header/SuggestedFollows.tsx
··· 28 28 actorDid: string 29 29 }) { 30 30 const gate = useGate() 31 + const {isLoading, data, error} = useSuggestedFollowsByActorQuery({ 32 + did: actorDid, 33 + }) 34 + 35 + if (!data?.suggestions?.length) return null 31 36 32 37 /* NOTE (caidanw): 33 38 * Android does not work well with this feature yet. ··· 40 45 41 46 return ( 42 47 <AccordionAnimation isExpanded={isExpanded}> 43 - <ProfileHeaderSuggestedFollows actorDid={actorDid} /> 48 + <ProfileGrid 49 + isSuggestionsLoading={isLoading} 50 + profiles={data.suggestions} 51 + recId={data.recId} 52 + error={error} 53 + viewContext="profileHeader" 54 + /> 44 55 </AccordionAnimation> 45 56 ) 46 57 }