more
This commit is contained in:
@@ -40,7 +40,7 @@ const UploadModal = (props) => {
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.REACT_APP_API_DEV
|
||||
: process.env.REACT_APP_API_PROD;
|
||||
|
||||
console.log("apiUrl", apiUrl);
|
||||
async function saveToDb(uuidName) {
|
||||
const createdAt = new Date();
|
||||
const data = {
|
||||
@@ -69,16 +69,13 @@ const UploadModal = (props) => {
|
||||
setFileToParse(file);
|
||||
setFileChanged(true);
|
||||
}
|
||||
|
||||
console.log("full request url:", `${apiUrl}/parseNewDoc`);
|
||||
async function uploadFile(file) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://www.novodraft.ai:4000/parseNewDoc`,
|
||||
{
|
||||
method: "POST",
|
||||
body: file,
|
||||
}
|
||||
);
|
||||
const response = await fetch(`${apiUrl}/parseNewDoc`, {
|
||||
method: "POST",
|
||||
body: file,
|
||||
});
|
||||
const res = response;
|
||||
return res;
|
||||
} catch (error) {
|
||||
|
||||
@@ -276,7 +276,7 @@ export const DocCard = (props) => {
|
||||
createdAt,
|
||||
} = props;
|
||||
const now = new Date().getTime();
|
||||
const uploadedAt = createdAt.toDate();
|
||||
const uploadedAt = createdAt ? createdAt.toDate() : new Date().getTime();
|
||||
const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15;
|
||||
const disabled = docType ? false : true;
|
||||
const tooltipText =
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
width: 90px;
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
padding-right: 10px;
|
||||
margin-right: 20px;
|
||||
|
||||
Reference in New Issue
Block a user