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 {useSetMinimalShellMode} from '#/state/shell'
6import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
7import {makeRecordUri} from 'lib/strings/url-helpers'
8import {s} from 'lib/styles'
9import {PostThread as PostThreadComponent} from '../com/post-thread/PostThread'
10
11type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostThread'>
12export function PostThreadScreen({route}: Props) {
13 const setMinimalShellMode = useSetMinimalShellMode()
14
15 const {name, rkey} = route.params
16 const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey)
17
18 useFocusEffect(
19 React.useCallback(() => {
20 setMinimalShellMode(false)
21 }, [setMinimalShellMode]),
22 )
23
24 return (
25 <View style={s.hContentRegion}>
26 <View style={s.flex1}>
27 <PostThreadComponent uri={uri} />
28 </View>
29 </View>
30 )
31}