about summary refs log tree commit diff
path: root/src/view/screens/stacks/ProfileFollows.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-07-26 12:02:34 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-07-26 12:02:34 -0500
commit62eb9f3c937028b6a6a8a3af40a03978fda5fef4 (patch)
tree4b027aea02c4e521632a54a9104fdffe665b2108 /src/view/screens/stacks/ProfileFollows.tsx
parent1504d144d9bbb90e4e048702f1e1b3db9d7ce17e (diff)
downloadvoidsky-62eb9f3c937028b6a6a8a3af40a03978fda5fef4.tar.zst
Add followers and follows list
Diffstat (limited to 'src/view/screens/stacks/ProfileFollows.tsx')
-rw-r--r--src/view/screens/stacks/ProfileFollows.tsx39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/view/screens/stacks/ProfileFollows.tsx b/src/view/screens/stacks/ProfileFollows.tsx
new file mode 100644
index 000000000..6fce3d798
--- /dev/null
+++ b/src/view/screens/stacks/ProfileFollows.tsx
@@ -0,0 +1,39 @@
+import React, {useLayoutEffect} from 'react'
+import {TouchableOpacity} from 'react-native'
+import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
+import {Shell} from '../../shell'
+import type {RootTabsScreenProps} from '../../routes/types'
+import {ProfileFollows as ProfileFollowsComponent} from '../../com/profile/ProfileFollows'
+
+export const ProfileFollows = ({
+  navigation,
+  route,
+}: RootTabsScreenProps<'ProfileFollows'>) => {
+  const {name} = route.params
+
+  useLayoutEffect(() => {
+    navigation.setOptions({
+      headerShown: true,
+      headerTitle: 'Following',
+      headerLeft: () => (
+        <TouchableOpacity onPress={() => navigation.goBack()}>
+          <FontAwesomeIcon icon="arrow-left" />
+        </TouchableOpacity>
+      ),
+    })
+  }, [navigation])
+
+  const onNavigateContent = (screen: string, props: Record<string, string>) => {
+    // @ts-ignore it's up to the callers to supply correct params -prf
+    navigation.push(screen, props)
+  }
+
+  return (
+    <Shell>
+      <ProfileFollowsComponent
+        name={name}
+        onNavigateContent={onNavigateContent}
+      />
+    </Shell>
+  )
+}