mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1import React from 'react'
2import {View} from 'react-native'
3import {useFocusEffect} from '@react-navigation/native'
4
5import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
6import {makeRecordUri} from '#/lib/strings/url-helpers'
7import {useSetMinimalShellMode} from '#/state/shell'
8import {PostThread as PostThreadComponent} from '#/view/com/post-thread/PostThread'
9import {atoms as a} from '#/alf'
10import * as Layout from '#/components/Layout'
11
12type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostThread'>
13export function PostThreadScreen({route}: Props) {
14 const setMinimalShellMode = useSetMinimalShellMode()
15
16 const {name, rkey} = route.params
17 const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey)
18
19 useFocusEffect(
20 React.useCallback(() => {
21 setMinimalShellMode(false)
22 }, [setMinimalShellMode]),
23 )
24
25 return (
26 <Layout.Screen testID="postThreadScreen">
27 <View style={a.flex_1}>
28 <PostThreadComponent uri={uri} />
29 </View>
30 </Layout.Screen>
31 )
32}