This commit is contained in:
Kenneth Jannette
2024-03-04 13:26:50 -06:00
parent 2ca944fa06
commit d27e5b8f6f
4 changed files with 79 additions and 7 deletions

View File

@@ -156,7 +156,7 @@ const DocEditPage = () => {
}
// TODO: possible *BUG* sometimes sends network req to gen repsonses after first (maybe state is not updating?)
getParsedRequests(documentId, documentType);
if (responsesCreated > 0) {
if (responsesCreated > 2) {
getCompletions(documentId)
.then((data) => {
const resp = data[0].responses.map((item, index) => {
@@ -174,10 +174,12 @@ const DocEditPage = () => {
*/
useEffect(() => {
/*
if (responsesCreated > 0) {
return;
}
if (responsesCreated < 1) {
*/
if (responsesCreated == 1) {
if (documentType == "combined-numbered") {
try {
const res = generateResponsesCombined(documentId);
@@ -300,12 +302,12 @@ const DocEditPage = () => {
}
async function generateResponses(documentId) {
/*
if (responsesCreated > 0) {
return;
}
*/
const docType = String(documentType);
let mode;
//TODO: remove isRequests var
const isRequests = false;