diff --git a/components/job-documents/job-documents.component.jsx b/components/job-documents/job-documents.component.jsx
index 9e7dae5..9928b7f 100644
--- a/components/job-documents/job-documents.component.jsx
+++ b/components/job-documents/job-documents.component.jsx
@@ -1,3 +1,4 @@
+import { Video } from "expo-av";
import React, { useMemo, useState } from "react";
import {
FlatList,
@@ -13,6 +14,13 @@ import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.compon
export default function JobDocumentsComponent({ job, loading, refetch }) {
const [previewVisible, setPreviewVisible] = useState(false);
+ const [videoUri, setVideoUri] = useState(null);
+ const [status, setStatus] = React.useState({});
+ console.log(
+ "🚀 ~ file: job-documents.component.jsx ~ line 19 ~ status",
+ status
+ );
+
const [imgIndex, setImgIndex] = useState(0);
const onRefresh = async () => {
return refetch();
@@ -41,33 +49,43 @@ export default function JobDocumentsComponent({ job, loading, refetch }) {
style={{ flex: 1 }}
keyExtractor={(item) => item.id}
renderItem={(object) => (
-
- {
+ {
+ if (DetermineFileType(object.item.type) === "image") {
+ //If image
setImgIndex(object.index);
setPreviewVisible(true);
+ } else {
+ //If Video
+ setVideoUri(GenerateSrcUrl(object.item));
+ }
+ }}
+ >
+
-
-
-
+ />
+
)}
/>
{job.documents.length}
+