[Statsig] Make gate checks lazily (#3594)
This commit is contained in:
parent
086dc93a7a
commit
02becdf449
14 changed files with 67 additions and 62 deletions
|
@ -143,7 +143,7 @@ function ProfileScreenLoaded({
|
|||
const setMinimalShellMode = useSetMinimalShellMode()
|
||||
const {openComposer} = useComposerControls()
|
||||
const {screen, track} = useAnalytics()
|
||||
const shouldUseScrollableHeader = useGate('new_profile_scroll_component')
|
||||
const gate = useGate()
|
||||
const {
|
||||
data: labelerInfo,
|
||||
error: labelerError,
|
||||
|
@ -317,7 +317,7 @@ function ProfileScreenLoaded({
|
|||
// =
|
||||
|
||||
const renderHeader = React.useCallback(() => {
|
||||
if (shouldUseScrollableHeader) {
|
||||
if (gate('new_profile_scroll_component')) {
|
||||
return (
|
||||
<ExpoScrollForwarderView scrollViewTag={scrollViewTag}>
|
||||
<ProfileHeader
|
||||
|
@ -343,7 +343,7 @@ function ProfileScreenLoaded({
|
|||
)
|
||||
}
|
||||
}, [
|
||||
shouldUseScrollableHeader,
|
||||
gate,
|
||||
scrollViewTag,
|
||||
profile,
|
||||
labelerInfo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue