Feature gate

This commit is contained in:
Eric Bailey
2025-06-05 16:41:51 -05:00
parent 8710e61529
commit c71b4ecb73
2 changed files with 9 additions and 3 deletions
+1
View File
@@ -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'
+8 -3
View File
@@ -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>
)
}