diff options
Diffstat (limited to 'src/screens/Post/PostQuotes.tsx')
-rw-r--r-- | src/screens/Post/PostQuotes.tsx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/screens/Post/PostQuotes.tsx b/src/screens/Post/PostQuotes.tsx new file mode 100644 index 000000000..d670f3215 --- /dev/null +++ b/src/screens/Post/PostQuotes.tsx @@ -0,0 +1,33 @@ +import React from 'react' +import {View} from 'react-native' +import {msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useFocusEffect} from '@react-navigation/native' + +import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import {makeRecordUri} from '#/lib/strings/url-helpers' +import {useSetMinimalShellMode} from '#/state/shell' +import {PostQuotes as PostQuotesComponent} from '#/view/com/post-thread/PostQuotes' +import {ViewHeader} from '#/view/com/util/ViewHeader' +import {atoms as a} from '#/alf' + +type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostQuotes'> +export const PostQuotesScreen = ({route}: Props) => { + const setMinimalShellMode = useSetMinimalShellMode() + const {name, rkey} = route.params + const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey) + const {_} = useLingui() + + useFocusEffect( + React.useCallback(() => { + setMinimalShellMode(false) + }, [setMinimalShellMode]), + ) + + return ( + <View style={a.flex_1}> + <ViewHeader title={_(msg`Quotes`)} /> + <PostQuotesComponent uri={uri} /> + </View> + ) +} |