From f36c9565362b741c58672204fe0c155252affe28 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Tue, 24 Jan 2023 13:00:11 -0600
Subject: Resolve all remaining lint issues (#88)

* Rework 'navIdx' variables from number arrays to strings to avoid equality-check failures in react hooks

* Resolve all remaining lint issues

* Fix tests

* Use node v18 in gh action test
---
 src/view/com/notifications/Feed.tsx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

(limited to 'src/view/com/notifications/Feed.tsx')

diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx
index ea7695d93..5f9cb129d 100644
--- a/src/view/com/notifications/Feed.tsx
+++ b/src/view/com/notifications/Feed.tsx
@@ -1,12 +1,13 @@
 import React from 'react'
 import {observer} from 'mobx-react-lite'
-import {View, FlatList} from 'react-native'
+import {FlatList, StyleSheet, View} from 'react-native'
 import {NotificationsViewModel} from '../../../state/models/notifications-view'
 import {FeedItem} from './FeedItem'
 import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
 import {ErrorMessage} from '../util/error/ErrorMessage'
 import {EmptyState} from '../util/EmptyState'
 import {OnScrollCb} from '../../lib/hooks/useOnMainScroll'
+import {s} from '../../lib/styles'
 
 const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
 
@@ -29,7 +30,7 @@ export const Feed = observer(function Feed({
         <EmptyState
           icon="bell"
           message="No notifications yet!"
-          style={{paddingVertical: 40}}
+          style={styles.emptyState}
         />
       )
     }
@@ -58,14 +59,10 @@ export const Feed = observer(function Feed({
     }
   }
   return (
-    <View style={{flex: 1}}>
+    <View style={s.h100pct}>
       {view.isLoading && !data && <NotificationFeedLoadingPlaceholder />}
       {view.hasError && (
-        <ErrorMessage
-          message={view.error}
-          style={{margin: 6}}
-          onPressTryAgain={onPressTryAgain}
-        />
+        <ErrorMessage message={view.error} onPressTryAgain={onPressTryAgain} />
       )}
       {data && (
         <FlatList
@@ -76,9 +73,13 @@ export const Feed = observer(function Feed({
           onRefresh={onRefresh}
           onEndReached={onEndReached}
           onScroll={onScroll}
-          contentContainerStyle={{paddingBottom: 200}}
+          contentContainerStyle={s.contentContainer}
         />
       )}
     </View>
   )
 })
+
+const styles = StyleSheet.create({
+  emptyState: {paddingVertical: 40},
+})
-- 
cgit 1.4.1

