about summary refs log tree commit diff
path: root/src/view/screens/PostRepostedBy.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/PostRepostedBy.tsx')
-rw-r--r--src/view/screens/PostRepostedBy.tsx25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/view/screens/PostRepostedBy.tsx b/src/view/screens/PostRepostedBy.tsx
index 81014a7c7..60950139d 100644
--- a/src/view/screens/PostRepostedBy.tsx
+++ b/src/view/screens/PostRepostedBy.tsx
@@ -1,26 +1,19 @@
-import React, {useLayoutEffect} from 'react'
-import {TouchableOpacity} from 'react-native'
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
+import React, {useEffect} from 'react'
 import {makeRecordUri} from '../lib/strings'
 import {PostRepostedBy as PostRepostedByComponent} from '../com/post-thread/PostRepostedBy'
 import {ScreenParams} from '../routes'
+import {useStores} from '../../state'
 
-export const PostRepostedBy = ({params}: ScreenParams) => {
+export const PostRepostedBy = ({visible, params}: ScreenParams) => {
+  const store = useStores()
   const {name, recordKey} = params
   const uri = makeRecordUri(name, 'blueskyweb.xyz:Posts', recordKey)
 
-  // TODO
-  // useLayoutEffect(() => {
-  //   navigation.setOptions({
-  //     headerShown: true,
-  //     headerTitle: 'Reposted By',
-  //     headerLeft: () => (
-  //       <TouchableOpacity onPress={() => navigation.goBack()}>
-  //         <FontAwesomeIcon icon="arrow-left" />
-  //       </TouchableOpacity>
-  //     ),
-  //   })
-  // }, [navigation])
+  useEffect(() => {
+    if (visible) {
+      store.nav.setTitle('Reposted by')
+    }
+  }, [store, visible])
 
   return <PostRepostedByComponent uri={uri} />
 }