Fix jump when toggling suggestions (#2090)

This commit is contained in:
dan 2023-12-05 17:13:09 +00:00 committed by GitHub
parent 37d94ca0e3
commit ed5a97d0fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 100 deletions

View file

@ -620,11 +620,17 @@ let ProfileHeaderLoaded = ({
<ProfileHeaderAlerts moderation={moderation} />
</View>
{!isProfilePreview && (
{!isProfilePreview && showSuggestedFollows && (
<ProfileHeaderSuggestedFollows
actorDid={profile.did}
active={showSuggestedFollows}
requestDismiss={() => setShowSuggestedFollows(!showSuggestedFollows)}
requestDismiss={() => {
if (showSuggestedFollows) {
setShowSuggestedFollows(false)
} else {
track('ProfileHeader:SuggestedFollowsOpened')
setShowSuggestedFollows(true)
}
}}
/>
)}