From aa085b0b147ddda619c6a143775863f9a2f4535e Mon Sep 17 00:00:00 2001 From: Ansh Date: Tue, 10 Oct 2023 14:32:00 -0700 Subject: [PATCH] make empty feed required (#1667) --- src/view/com/posts/Feed.tsx | 7 ++----- src/view/screens/Home.tsx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx index b095fe07b5..0de769aab0 100644 --- a/src/view/com/posts/Feed.tsx +++ b/src/view/com/posts/Feed.tsx @@ -45,7 +45,7 @@ export const Feed = observer(function Feed({ onPressTryAgain?: () => void onScroll?: OnScrollCb scrollEventThrottle?: number - renderEmptyState?: () => JSX.Element + renderEmptyState: () => JSX.Element renderEndOfFeed?: () => JSX.Element testID?: string headerOffset?: number @@ -116,10 +116,7 @@ export const Feed = observer(function Feed({ const renderItem = React.useCallback( ({item}: {item: any}) => { if (item === EMPTY_FEED_ITEM) { - if (renderEmptyState) { - return renderEmptyState() - } - return + return renderEmptyState() } else if (item === ERROR_ITEM) { return ( JSX.Element + renderEmptyState: () => JSX.Element renderEndOfFeed?: () => JSX.Element }) { const store = useStores()