Reorganize all the navigators

This commit is contained in:
Adolfo Reyna
2022-12-22 14:48:17 -05:00
parent c2ed9af093
commit 44c5bf0eea
3 changed files with 100 additions and 64 deletions

View File

@@ -71,24 +71,21 @@ let Feed = ({ navigation, route }) => {
return (
<SafeAreaView style={styles.container}>
<View>
<FlatList
data={Posts}
renderItem={renderPost}
keyExtractor={item => item._id || item.createdAt}
ListHeaderComponent={<NewPost newPostCB={(newPost) => setPosts([newPost, ...Posts])} />}
refreshing={Posts.length === 0}
onRefresh={() => {
API.getPosts().then(setPosts);
}}
initialNumToRender={3}
maxToRenderPerBatch={3}
removeClippedSubviews={true}
/>
</View>
<StatusBar style="auto" />
<SafeAreaView>
<FlatList
data={Posts}
renderItem={renderPost}
keyExtractor={item => item._id || item.createdAt}
//ListHeaderComponent={<NewPost newPostCB={(newPost) => setPosts([newPost, ...Posts])} />}
refreshing={Posts.length === 0}
onRefresh={() => {
API.getPosts().then(setPosts);
}}
initialNumToRender={3}
maxToRenderPerBatch={3}
removeClippedSubviews={true}
style={styles.container}
/>
</SafeAreaView>
);
}
@@ -97,7 +94,6 @@ export default Feed;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#edf2f7",
},
});