diff --git a/src/Components/Document/ReqEditPage.js b/src/Components/Document/ReqEditPage.js index 7589510..5347e0d 100644 --- a/src/Components/Document/ReqEditPage.js +++ b/src/Components/Document/ReqEditPage.js @@ -60,19 +60,6 @@ const RequestEditPage = () => { ? process.env.REACT_APP_API_DEV : process.env.REACT_APP_API_PROD; - const headerString = - documentType === "interrogatories" ? ( - "Response to Interrogatories" - ) : documentType === "admissions" ? ( - "Response to Request for Admissions" - ) : documentType === "production" ? ( - "Response to Request for Production" - ) : documentType === "combined-numbered" ? ( - "Response to Interrogatories and Request for Production" - ) : ( - <>> - ); - useEffect(() => { if (!appUserId || !docId) { setDocument(null); @@ -92,16 +79,15 @@ const RequestEditPage = () => { } getOutgoingRequests(documentId) .then((data) => { - const resp = data[0].requests.map((item, index) => { + const merged = [...foundationRogs, ...data[0].requests]; + const resp = merged.map((item, index) => { // NEVER CHANGE THIS: return { showInputEle: false, text: item.text, index: index }; }); - const merged = [...foundationRogs, ...resp]; - setRequests(merged); + setRequests(resp); }) .catch((err) => console.log(err)); }, [documentId]); - async function getCase(parentCaseId) { try { const docRef = doc(db, "cases", `${parentCaseId}`); @@ -349,16 +335,32 @@ const RequestEditPage = () => { ))} -