about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-22 12:29:50 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-22 12:29:50 -0600
commit8f883d00bc75d7464391ff91fca37a9e45970a00 (patch)
treef182ff7b8bccb7dc682428ad755b37a5bb1ea02c
parenteaa2105570126fd930985a209808c6aa82806db9 (diff)
downloadvoidsky-8f883d00bc75d7464391ff91fca37a9e45970a00.tar.zst
Add compose prompt to home feed empty state
-rw-r--r--src/view/com/posts/Feed.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx
index 3a2bc6189..d37e51377 100644
--- a/src/view/com/posts/Feed.tsx
+++ b/src/view/com/posts/Feed.tsx
@@ -20,7 +20,7 @@ export const Feed = observer(function Feed({
   feed: FeedModel
   style?: StyleProp<ViewStyle>
   scrollElRef?: MutableRefObject<FlatList<any> | null>
-  onPressCompose?: () => void
+  onPressCompose: () => void
   onPressTryAgain?: () => void
 }) {
   // TODO optimize renderItem or FeedItem, we're getting this notice from RN: -prf
@@ -65,7 +65,12 @@ export const Feed = observer(function Feed({
           onEndReached={onEndReached}
         />
       )}
-      {feed.isEmpty && <EmptyState icon="bars" message="This feed is empty!" />}
+      {feed.isEmpty && (
+        <View>
+          <ComposePrompt onPressCompose={onPressCompose} />
+          <EmptyState icon="bars" message="This feed is empty!" />
+        </View>
+      )}
     </View>
   )
 })