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/view/com/post-thread/PostThreadFollowBtn.tsx | |
parent | 086dc93a7a6e69b0df2ed084ee68bb4e26c13f88 (diff) | |
download | voidsky-02becdf4491cded0f0435e880e1ad4030d500403.tar.zst |
[Statsig] Make gate checks lazily (#3594)
Diffstat (limited to 'src/view/com/post-thread/PostThreadFollowBtn.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThreadFollowBtn.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/view/com/post-thread/PostThreadFollowBtn.tsx b/src/view/com/post-thread/PostThreadFollowBtn.tsx index 8b297121e..7c9a54451 100644 --- a/src/view/com/post-thread/PostThreadFollowBtn.tsx +++ b/src/view/com/post-thread/PostThreadFollowBtn.tsx @@ -48,7 +48,7 @@ function PostThreadFollowBtnLoaded({ 'PostThreadItem', ) const requireAuth = useRequireAuth() - const showFollowBackLabel = useGate('show_follow_back_label') + const gate = useGate() const isFollowing = !!profile.viewer?.following const isFollowedBy = !!profile.viewer?.followedBy @@ -140,7 +140,7 @@ function PostThreadFollowBtnLoaded({ style={[!isFollowing ? palInverted.text : pal.text, s.bold]} numberOfLines={1}> {!isFollowing ? ( - showFollowBackLabel && isFollowedBy ? ( + isFollowedBy && gate('show_follow_back_label') ? ( <Trans>Follow Back</Trans> ) : ( <Trans>Follow</Trans> |