diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-03-13 23:30:12 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-03-13 23:30:12 -0500 |
commit | 774fb8371905473b88b26c350818aa6b4bf1bac2 (patch) | |
tree | ceee7f24ce3696b8890ef7bb3eb42bb04ba1078e /src/view/screens/PostThread.tsx | |
parent | b5c64a03b6cf91fb1699d2e87d3fded43a5dbb46 (diff) | |
download | voidsky-774fb8371905473b88b26c350818aa6b4bf1bac2.tar.zst |
Rework logged out state to preserve routing and work for web
Diffstat (limited to 'src/view/screens/PostThread.tsx')
-rw-r--r-- | src/view/screens/PostThread.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view/screens/PostThread.tsx b/src/view/screens/PostThread.tsx index 0e9feae0b..ad54126b6 100644 --- a/src/view/screens/PostThread.tsx +++ b/src/view/screens/PostThread.tsx @@ -3,6 +3,7 @@ import {StyleSheet, View} from 'react-native' import {useFocusEffect} from '@react-navigation/native' import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import {makeRecordUri} from 'lib/strings/url-helpers' +import {withAuthRequired} from 'view/com/auth/withAuthRequired' import {ViewHeader} from '../com/util/ViewHeader' import {PostThread as PostThreadComponent} from '../com/post-thread/PostThread' import {ComposePrompt} from 'view/com/composer/Prompt' @@ -16,7 +17,7 @@ import {isDesktopWeb} from 'platform/detection' const SHELL_FOOTER_HEIGHT = 44 type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostThread'> -export const PostThreadScreen = ({route}: Props) => { +export const PostThreadScreen = withAuthRequired(({route}: Props) => { const store = useStores() const safeAreaInsets = useSafeAreaInsets() const {name, rkey} = route.params @@ -84,7 +85,7 @@ export const PostThreadScreen = ({route}: Props) => { )} </View> ) -} +}) const styles = StyleSheet.create({ prompt: { |