diff --git a/src/Components/Document/DocEditPage.js b/src/Components/Document/DocEditPage.js index 514fae3..3ab7f94 100644 --- a/src/Components/Document/DocEditPage.js +++ b/src/Components/Document/DocEditPage.js @@ -39,6 +39,7 @@ const DocEditPage = () => { const [isLoading, setIsLoading] = useState(false); const [isReport, setIsReport] = useState(false); const [issueText, setIssueText] = useState(""); + const [showErrorModal, setShowErrorModal] = useState(false); const [responsesCreated, setResponsesCreated] = useState( parseInt(responseGenerations) ); @@ -53,7 +54,7 @@ const DocEditPage = () => { const usState = group.state[0] ? group.state[0].code : "ny"; const zipCode = group ? group.zipCode : null; const telephone = group ? group.telephone : null; - console.log("state", state); + const apiUrl = process.env.NODE_ENV === "development" ? process.env.REACT_APP_API_DEV @@ -361,7 +362,7 @@ const DocEditPage = () => { setTimeout(getDocx, 5000); setTimeout(cleanUpDocx, 10000); } else { - // handle error + setShowErrorModal(true); } setIsBusy(false); } @@ -694,6 +695,16 @@ const DocEditPage = () => { } /> ) : null} + {showErrorModal ? ( + setShowErrorModal(false)} + onConfirm={() => setShowErrorModal(false)} + buttonLabelText="Confirm" + modalText={ + "There was a problem. Support was notified and will respond within 24 hours." + } + /> + ) : null} ); };