Added loading of documents thumbnails

This commit is contained in:
Patrick Fic
2020-12-09 20:45:45 -08:00
parent ee77860112
commit 2efac1ed2b
9 changed files with 134 additions and 24 deletions

View File

@@ -1,18 +1,11 @@
import Dinero from "dinero.js";
import {
Card,
CardItem,
H3,
Text,
View,
Container,
Content,
} from "native-base";
import { Card, CardItem, H3, Text } from "native-base";
import React from "react";
import { StyleSheet, RefreshControl, FlatList } from "react-native";
import { useTranslation } from "react-i18next";
import { FlatList, RefreshControl } from "react-native";
import JobNotesItem from "../job-notes-item/job-notes-item.component";
export default function JobNotes({ job, loading, refetch }) {
const { t } = useTranslation();
if (!!!job) {
<Card>
<Text>Job is not defined.</Text>
@@ -22,6 +15,14 @@ export default function JobNotes({ job, loading, refetch }) {
const onRefresh = async () => {
return refetch();
};
if (job.notes.length === 0)
return (
<Card>
<CardItem>
<H3>{t("jobdetail.labels.nojobnotes")}</H3>
</CardItem>
</Card>
);
return (
<FlatList