don't use gate
This commit is contained in:
@@ -16,3 +16,5 @@ export const appVersion = `${nativeApplicationVersion}.${nativeBuildVersion}`
|
|||||||
export const bundleInfo = `${BUNDLE_IDENTIFIER} (${
|
export const bundleInfo = `${BUNDLE_IDENTIFIER} (${
|
||||||
__DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
|
__DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
|
||||||
})`
|
})`
|
||||||
|
|
||||||
|
export const USE_OAUTH = process.env.EXPO_PUBLIC_USE_OAUTH === 'true'
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ export type Gate =
|
|||||||
| 'debug_show_feedcontext'
|
| 'debug_show_feedcontext'
|
||||||
| 'debug_subscriptions'
|
| 'debug_subscriptions'
|
||||||
| 'explore_show_suggested_feeds'
|
| 'explore_show_suggested_feeds'
|
||||||
| 'oauth'
|
|
||||||
| 'old_postonboarding'
|
| 'old_postonboarding'
|
||||||
| 'onboarding_add_video_feed'
|
| 'onboarding_add_video_feed'
|
||||||
| 'post_threads_v2_unspecced'
|
| 'post_threads_v2_unspecced'
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import {
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {USE_OAUTH} from '#/lib/app-info'
|
||||||
import {useRequestNotificationsPermission} from '#/lib/notifications/notifications'
|
import {useRequestNotificationsPermission} from '#/lib/notifications/notifications'
|
||||||
import {useGate} from '#/lib/statsig/statsig'
|
|
||||||
import {isNetworkError} from '#/lib/strings/errors'
|
import {isNetworkError} from '#/lib/strings/errors'
|
||||||
import {cleanError} from '#/lib/strings/errors'
|
import {cleanError} from '#/lib/strings/errors'
|
||||||
import {createFullHandle} from '#/lib/strings/handles'
|
import {createFullHandle} from '#/lib/strings/handles'
|
||||||
@@ -53,8 +53,7 @@ interface LoginFormProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function LoginForm(props: LoginFormProps) {
|
export function LoginForm(props: LoginFormProps) {
|
||||||
const gate = useGate()
|
if (USE_OAUTH) {
|
||||||
if (gate('oauth')) {
|
|
||||||
return <OAuthLoginForm {...props} />
|
return <OAuthLoginForm {...props} />
|
||||||
} else {
|
} else {
|
||||||
return <LoginFormInner {...props} />
|
return <LoginFormInner {...props} />
|
||||||
|
|||||||
Reference in New Issue
Block a user