BOD-24 Removed URL/Thumb URL to have them dynamically created.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Button, notification } from "antd";
|
||||
import { Button } from "antd";
|
||||
import axios from "axios";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import axios from "axios";
|
||||
|
||||
export default function JobsDocumentsDownloadButton({ galleryImages }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -11,13 +11,11 @@ function JobsDocumentsComponent({ data, jobId, refetch }) {
|
||||
setgalleryImages(
|
||||
data.reduce((acc, value) => {
|
||||
acc.push({
|
||||
src: value.url,
|
||||
thumbnail: `${
|
||||
process.env.REACT_APP_CLOUDINARY_IMAGE_ENDPOINT
|
||||
}/h_200,w_200,c_thumb/${value.key}${
|
||||
value.type.includes("pdf") ? ".jpg" : ""
|
||||
}`,
|
||||
tags: value.type.includes("pdf") ? [{ value: "PDF" }] : [],
|
||||
src: `${process.env.REACT_APP_CLOUDINARY_IMAGE_ENDPOINT}/${value.key}.jpg`,
|
||||
thumbnail: `${process.env.REACT_APP_CLOUDINARY_IMAGE_ENDPOINT}/h_200,w_200,c_thumb/${value.key}.jpg`,
|
||||
tags: value.type.includes("pdf")
|
||||
? [{ value: "PDF", title: "PDF" }]
|
||||
: [],
|
||||
thumbnailHeight: 200,
|
||||
thumbnailWidth: 200,
|
||||
isSelected: false,
|
||||
@@ -31,7 +29,11 @@ function JobsDocumentsComponent({ data, jobId, refetch }) {
|
||||
|
||||
return (
|
||||
<div className="clearfix">
|
||||
<DocumentsUploadContainer jobId={jobId} callbackAfterUpload={refetch} />
|
||||
<DocumentsUploadContainer
|
||||
jobId={jobId}
|
||||
callbackAfterUpload={refetch}
|
||||
tagsArray={["test"]}
|
||||
/>
|
||||
|
||||
<JobsDocumentsDownloadButton galleryImages={galleryImages} />
|
||||
<JobsDocumentsDeleteButton
|
||||
|
||||
Reference in New Issue
Block a user