about summary refs log tree commit diff
path: root/src/screens/Profile/Header/ProfileHeaderStandard.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-09-07 17:08:19 +0200
committerGitHub <noreply@github.com>2024-09-07 17:08:19 +0200
commit292117804f986686c35c9fd3da1a8a4f22af49fc (patch)
treeede8c51b4d125b399b93888b59e33c78b6e1c88b /src/screens/Profile/Header/ProfileHeaderStandard.tsx
parent7d7431d14e52d94cce51941013c8a5fe5665adb1 (diff)
downloadvoidsky-292117804f986686c35c9fd3da1a8a4f22af49fc.tar.zst
Set show_follow_suggestions_in_profile to true (#5205)
Diffstat (limited to 'src/screens/Profile/Header/ProfileHeaderStandard.tsx')
-rw-r--r--src/screens/Profile/Header/ProfileHeaderStandard.tsx50
1 files changed, 2 insertions, 48 deletions
diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx
index 2036023c3..cf5fcb97e 100644
--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx
+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx
@@ -6,11 +6,9 @@ import {
   ModerationOpts,
   RichText as RichTextAPI,
 } from '@atproto/api'
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
 import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
-import {useGate} from '#/lib/statsig/statsig'
 import {logger} from '#/logger'
 import {isIOS} from '#/platform/detection'
 import {Shadow} from '#/state/cache/types'
@@ -23,10 +21,9 @@ import {useRequireAuth, useSession} from '#/state/session'
 import {useAnalytics} from 'lib/analytics/analytics'
 import {sanitizeDisplayName} from 'lib/strings/display-names'
 import {useProfileShadow} from 'state/cache/profile-shadow'
-import {ProfileHeaderSuggestedFollows} from '#/view/com/profile/ProfileHeaderSuggestedFollows'
 import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
 import * as Toast from '#/view/com/util/Toast'
-import {atoms as a, useTheme} from '#/alf'
+import {atoms as a} from '#/alf'
 import {Button, ButtonIcon, ButtonText} from '#/components/Button'
 import {MessageProfileButton} from '#/components/dms/MessageProfileButton'
 import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
@@ -59,8 +56,6 @@ let ProfileHeaderStandard = ({
 }: Props): React.ReactNode => {
   const profile: Shadow<AppBskyActorDefs.ProfileViewDetailed> =
     useProfileShadow(profileUnshadowed)
-  const t = useTheme()
-  const gate = useGate()
   const {currentAccount, hasSession} = useSession()
   const {_} = useLingui()
   const {openModal} = useModalControls()
@@ -69,7 +64,6 @@ let ProfileHeaderStandard = ({
     () => moderateProfile(profile, moderationOpts),
     [profile, moderationOpts],
   )
-  const [showSuggestedFollows, setShowSuggestedFollows] = React.useState(false)
   const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(
     profile,
     'ProfileHeader',
@@ -202,34 +196,7 @@ let ProfileHeaderStandard = ({
             )
           ) : !profile.viewer?.blockedBy ? (
             <>
-              {hasSession && (
-                <>
-                  <MessageProfileButton profile={profile} />
-                  {!gate('show_follow_suggestions_in_profile') && (
-                    <Button
-                      testID="suggestedFollowsBtn"
-                      size="small"
-                      color={showSuggestedFollows ? 'primary' : 'secondary'}
-                      variant="solid"
-                      shape="round"
-                      onPress={() =>
-                        setShowSuggestedFollows(!showSuggestedFollows)
-                      }
-                      label={_(msg`Show follows similar to ${profile.handle}`)}
-                      style={{width: 36, height: 36}}>
-                      <FontAwesomeIcon
-                        icon="user-plus"
-                        style={
-                          showSuggestedFollows
-                            ? {color: t.palette.white}
-                            : t.atoms.text
-                        }
-                        size={14}
-                      />
-                    </Button>
-                  )}
-                </>
-              )}
+              {hasSession && <MessageProfileButton profile={profile} />}
 
               <Button
                 testID={profile.viewer?.following ? 'unfollowBtn' : 'followBtn'}
@@ -294,19 +261,6 @@ let ProfileHeaderStandard = ({
           </>
         )}
       </View>
-      {showSuggestedFollows && (
-        <ProfileHeaderSuggestedFollows
-          actorDid={profile.did}
-          requestDismiss={() => {
-            if (showSuggestedFollows) {
-              setShowSuggestedFollows(false)
-            } else {
-              track('ProfileHeader:SuggestedFollowsOpened')
-              setShowSuggestedFollows(true)
-            }
-          }}
-        />
-      )}
       <Prompt.Basic
         control={unblockPromptControl}
         title={_(msg`Unblock Account?`)}