diff options
author | dan <dan.abramov@gmail.com> | 2024-04-18 04:39:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 04:39:29 +0100 |
commit | 02becdf4491cded0f0435e880e1ad4030d500403 (patch) | |
tree | 725ffa94609c380d4a9d8f25609642eb7d4b4748 /src/screens/Profile/Header/ProfileHeaderStandard.tsx | |
parent | 086dc93a7a6e69b0df2ed084ee68bb4e26c13f88 (diff) | |
download | voidsky-02becdf4491cded0f0435e880e1ad4030d500403.tar.zst |
[Statsig] Make gate checks lazily (#3594)
Diffstat (limited to 'src/screens/Profile/Header/ProfileHeaderStandard.tsx')
-rw-r--r-- | src/screens/Profile/Header/ProfileHeaderStandard.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx index accef12ed..9e0361326 100644 --- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx +++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -80,9 +80,7 @@ let ProfileHeaderStandard = ({ }) }, [track, openModal, profile]) - const autoExpandSuggestionsOnProfileFollow = useGate( - 'autoexpand_suggestions_on_profile_follow', - ) + const gate = useGate() const onPressFollow = () => { requireAuth(async () => { try { @@ -96,7 +94,7 @@ let ProfileHeaderStandard = ({ )}`, ), ) - if (isWeb && autoExpandSuggestionsOnProfileFollow) { + if (isWeb && gate('autoexpand_suggestions_on_profile_follow')) { setShowSuggestedFollows(true) } } catch (e: any) { |