[Statsig] Make gate checks lazily (#3594)

This commit is contained in:
dan 2024-04-18 04:39:29 +01:00 committed by GitHub
parent 086dc93a7a
commit 02becdf449
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 67 additions and 62 deletions

View file

@ -38,8 +38,7 @@ export function ModerationBlockedAccounts({}: Props) {
const setMinimalShellMode = useSetMinimalShellMode()
const {isTabletOrDesktop} = useWebMediaQueries()
const {screen} = useAnalytics()
const showsVerticalScrollIndicator =
!useGate('hide_vertical_scroll_indicators') || isWeb
const gate = useGate()
const [isPTRing, setIsPTRing] = React.useState(false)
const {
@ -169,7 +168,9 @@ export function ModerationBlockedAccounts({}: Props) {
)}
// @ts-ignore our .web version only -prf
desktopFixedHeight
showsVerticalScrollIndicator={showsVerticalScrollIndicator}
showsVerticalScrollIndicator={
isWeb || !gate('hide_vertical_scroll_indicators')
}
/>
)}
</CenteredView>