Feature gate
This commit is contained in:
@@ -6,6 +6,7 @@ export type Gate =
|
||||
| 'explore_show_suggested_feeds'
|
||||
| 'old_postonboarding'
|
||||
| 'onboarding_add_video_feed'
|
||||
| 'post_threads_v2_unspecced'
|
||||
| 'remove_show_latest_button'
|
||||
| 'test_gate_1'
|
||||
| 'test_gate_2'
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import {useCallback} from 'react'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
|
||||
// import {PostThread as PostThreadComponent} from '#/view/com/post-thread/PostThread'
|
||||
import {
|
||||
type CommonNavigatorParams,
|
||||
type NativeStackScreenProps,
|
||||
} from '#/lib/routes/types'
|
||||
import {useGate} from '#/lib/statsig/statsig'
|
||||
import {makeRecordUri} from '#/lib/strings/url-helpers'
|
||||
import {useSetMinimalShellMode} from '#/state/shell'
|
||||
import {PostThread as PostThreadComponent} from '#/view/com/post-thread/PostThread'
|
||||
import {Inner} from '#/screens/PostThread'
|
||||
import * as Layout from '#/components/Layout'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostThread'>
|
||||
export function PostThreadScreen({route}: Props) {
|
||||
const setMinimalShellMode = useSetMinimalShellMode()
|
||||
const gate = useGate()
|
||||
|
||||
const {name, rkey} = route.params
|
||||
const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey)
|
||||
@@ -26,8 +28,11 @@ export function PostThreadScreen({route}: Props) {
|
||||
|
||||
return (
|
||||
<Layout.Screen testID="postThreadScreen">
|
||||
{/* <PostThreadComponent uri={uri} /> */}
|
||||
<Inner uri={uri} />
|
||||
{gate('post_threads_v2_unspecced') ? (
|
||||
<Inner uri={uri} />
|
||||
) : (
|
||||
<PostThreadComponent uri={uri} />
|
||||
)}
|
||||
</Layout.Screen>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user