about summary refs log tree commit diff
path: root/src/view/com/notifications/Feed.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/notifications/Feed.tsx')
-rw-r--r--src/view/com/notifications/Feed.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx
index a3cac0cdf..2b7bb878f 100644
--- a/src/view/com/notifications/Feed.tsx
+++ b/src/view/com/notifications/Feed.tsx
@@ -6,11 +6,14 @@ import {
   NotificationsViewItemModel,
 } from '../../../state/models/notifications-view'
 import {FeedItem} from './FeedItem'
+import {ErrorMessage} from '../util/ErrorMessage'
 
 export const Feed = observer(function Feed({
   view,
+  onPressTryAgain,
 }: {
   view: NotificationsViewModel
+  onPressTryAgain?: () => void
 }) {
   // TODO optimize renderItem or FeedItem, we're getting this notice from RN: -prf
   //   VirtualizedList: You have a large list that is slow to update - make sure your
@@ -30,7 +33,14 @@ export const Feed = observer(function Feed({
       {view.isLoading && !view.isRefreshing && !view.hasContent && (
         <Text>Loading...</Text>
       )}
-      {view.hasError && <Text>{view.error}</Text>}
+      {view.hasError && (
+        <ErrorMessage
+          dark
+          message={view.error}
+          style={{margin: 6}}
+          onPressTryAgain={onPressTryAgain}
+        />
+      )}
       {view.hasContent && (
         <FlatList
           data={view.notifications}