Refactor to using RNP & UI Updates.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FlatList, RefreshControl, Text } from "react-native";
|
||||
import JobNotesItem from "../job-notes-item/job-notes-item.component";
|
||||
import { Card } from "react-native-paper";
|
||||
import JobNotesItem from "../job-notes-item/job-notes-item.component";
|
||||
export default function JobNotes({ job, loading, refetch }) {
|
||||
const { t } = useTranslation();
|
||||
if (!job) {
|
||||
@@ -14,6 +14,7 @@ export default function JobNotes({ job, loading, refetch }) {
|
||||
const onRefresh = async () => {
|
||||
return refetch();
|
||||
};
|
||||
|
||||
if (job.notes.length === 0)
|
||||
return (
|
||||
<Card>
|
||||
@@ -31,7 +32,6 @@ export default function JobNotes({ job, loading, refetch }) {
|
||||
style={{ flex: 1 }}
|
||||
data={job.notes}
|
||||
renderItem={(object) => <JobNotesItem item={object.item} />}
|
||||
//ItemSeparatorComponent={FlatListItemSeparator}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user