[Statsig] Mark Testflight as staging tier (#3470)

zio/stable
dan 2024-04-10 20:08:46 +01:00 committed by GitHub
parent 427f3a848d
commit 310d865440
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import {
} from 'statsig-react-native-expo' } from 'statsig-react-native-expo'
import {logger} from '#/logger' import {logger} from '#/logger'
import {IS_TESTFLIGHT} from 'lib/app-info'
import {useSession} from '../../state/session' import {useSession} from '../../state/session'
import {LogEvents} from './events' import {LogEvents} from './events'
import {Gate} from './gates' import {Gate} from './gates'
@ -17,7 +18,12 @@ export type {LogEvents}
const statsigOptions = { const statsigOptions = {
environment: { environment: {
tier: process.env.NODE_ENV === 'development' ? 'development' : 'production', tier:
process.env.NODE_ENV === 'development'
? 'development'
: IS_TESTFLIGHT
? 'staging'
: 'production',
}, },
// Don't block on waiting for network. The fetched config will kick in on next load. // Don't block on waiting for network. The fetched config will kick in on next load.
// This ensures the UI is always consistent and doesn't update mid-session. // This ensures the UI is always consistent and doesn't update mid-session.