[Statsig] Make gate checks lazily (#3594)
This commit is contained in:
parent
086dc93a7a
commit
02becdf449
14 changed files with 67 additions and 62 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue