diff --git a/client/src/components/jobs-documents/jobs-documents.page.jsx b/client/src/components/jobs-documents/jobs-documents.page.jsx index f520ae6aa..21cf20e1a 100644 --- a/client/src/components/jobs-documents/jobs-documents.page.jsx +++ b/client/src/components/jobs-documents/jobs-documents.page.jsx @@ -1,11 +1,11 @@ -import React, { useState } from "react"; -import { useTranslation } from "react-i18next"; -import { Upload, Modal, Icon, notification } from "antd"; +import { Button, Icon, Modal, notification, Upload } from "antd"; import axios from "axios"; -import "./jobs-documents.styles.scss"; -import Resizer from "react-image-file-resizer"; +import React, { useState } from "react"; import { useMutation } from "react-apollo"; +import { useTranslation } from "react-i18next"; +import Resizer from "react-image-file-resizer"; import { INSERT_NEW_DOCUMENT } from "../../graphql/documents.queries"; +import "./jobs-documents.styles.scss"; function getBase64(file) { return new Promise((resolve, reject) => { @@ -148,8 +148,34 @@ function JobsDocumentsComponent({ shopId, jobId, loading, data }) { // // ); + console.log( + "process.env.REACT_APP_S3_BUCKET", + process.env.REACT_APP_S3_BUCKET + ); + const imageRequest = JSON.stringify({ + bucket: process.env.REACT_APP_S3_BUCKET, + key: + "52b7357c-0edd-4c95-85c3-dfdbcdfad9ac/f11e92a4-8a7d-4ec0-86ac-2f46b631e438/thumb-1920-459857.jpg", + edits: { + resize: { + height: 100, + width: 100 + } + } + }); + const CloudFrontUrl = "https://d18fc493a0fm4o.cloudfront.net"; + const url = `${CloudFrontUrl}/${btoa(imageRequest)}`; + return (
+ + test