Remove duplicated virtualized lists.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Container, Content, Thumbnail } from "native-base";
|
||||
import { Thumbnail } from "native-base";
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
FlatList,
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from "react-native";
|
||||
import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.component";
|
||||
|
||||
@@ -20,16 +21,12 @@ export default function JobDocumentsComponent({ job, loading, refetch }) {
|
||||
return refetch();
|
||||
};
|
||||
return (
|
||||
<Container>
|
||||
<Content
|
||||
padder
|
||||
<View>
|
||||
<FlatList
|
||||
refreshControl={
|
||||
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
||||
}
|
||||
>
|
||||
<FlatList
|
||||
data={job.documents}
|
||||
style={{ flex: 1 }}
|
||||
contentContainerStyle={styles.listContentContainer}
|
||||
keyExtractor={(item) => item.id}
|
||||
numColumns={4}
|
||||
@@ -58,8 +55,7 @@ export default function JobDocumentsComponent({ job, loading, refetch }) {
|
||||
previewVisible={previewVisible}
|
||||
setPreviewVisible={setPreviewVisible}
|
||||
/>
|
||||
</Content>
|
||||
</Container>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { Card, CardItem, Container, Content, Text } from "native-base";
|
||||
import Dinero from "dinero.js";
|
||||
import { Card, CardItem, Text } from "native-base";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FlatList, RefreshControl, StyleSheet } from "react-native";
|
||||
import Dinero from "dinero.js";
|
||||
import { FlatList, RefreshControl, StyleSheet, View } from "react-native";
|
||||
|
||||
export default function JobLines({ job, loading, refetch }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!job) {
|
||||
<Card>
|
||||
<Text>Job is not defined.</Text>
|
||||
@@ -16,16 +17,12 @@ export default function JobLines({ job, loading, refetch }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<Content
|
||||
padder
|
||||
<View>
|
||||
<FlatList
|
||||
data={job.joblines}
|
||||
refreshControl={
|
||||
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
||||
}
|
||||
>
|
||||
<FlatList
|
||||
data={job.joblines}
|
||||
style={{ flex: 1 }}
|
||||
contentContainerStyle={localStyles.listContentContainer}
|
||||
keyExtractor={(item) => item.id}
|
||||
renderItem={(object) => (
|
||||
@@ -57,8 +54,7 @@ export default function JobLines({ job, loading, refetch }) {
|
||||
</Card>
|
||||
)}
|
||||
/>
|
||||
</Content>
|
||||
</Container>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user