about summary refs log tree commit diff
path: root/src/view/screens/Profile.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-04-18 04:39:29 +0100
committerGitHub <noreply@github.com>2024-04-18 04:39:29 +0100
commit02becdf4491cded0f0435e880e1ad4030d500403 (patch)
tree725ffa94609c380d4a9d8f25609642eb7d4b4748 /src/view/screens/Profile.tsx
parent086dc93a7a6e69b0df2ed084ee68bb4e26c13f88 (diff)
downloadvoidsky-02becdf4491cded0f0435e880e1ad4030d500403.tar.zst
[Statsig] Make gate checks lazily (#3594)
Diffstat (limited to 'src/view/screens/Profile.tsx')
-rw-r--r--src/view/screens/Profile.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index f71e1330e..c7f5a6627 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -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,