Added tabs to jobs detail + some basic rendering.
This commit is contained in:
37
components/job-notes/job-notes.component.jsx
Normal file
37
components/job-notes/job-notes.component.jsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import Dinero from "dinero.js";
|
||||
import {
|
||||
Card,
|
||||
CardItem,
|
||||
H3,
|
||||
Text,
|
||||
View,
|
||||
Container,
|
||||
Content,
|
||||
} from "native-base";
|
||||
import React from "react";
|
||||
import { StyleSheet, RefreshControl, FlatList } from "react-native";
|
||||
import JobNotesItem from "../job-notes-item/job-notes-item.component";
|
||||
|
||||
export default function JobNotes({ job, loading, refetch }) {
|
||||
if (!!!job) {
|
||||
<Card>
|
||||
<Text>Job is not defined.</Text>
|
||||
</Card>;
|
||||
}
|
||||
console.log("job.notes :>> ", job.notes);
|
||||
const onRefresh = async () => {
|
||||
return refetch();
|
||||
};
|
||||
|
||||
return (
|
||||
<FlatList
|
||||
refreshControl={
|
||||
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
||||
}
|
||||
style={{ flex: 1 }}
|
||||
data={job.notes}
|
||||
renderItem={(object) => <JobNotesItem item={object.item} />}
|
||||
//ItemSeparatorComponent={FlatListItemSeparator}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user