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