more
This commit is contained in:
@@ -24,6 +24,15 @@ const DocEditPage = (props) => {
|
||||
const navigate = useNavigate();
|
||||
const { documentId, caseId, docType, clientPosition, responseGenerations } =
|
||||
useParams();
|
||||
|
||||
console.log(
|
||||
"documentId, caseId, docType, clientPosition, responseGenerations",
|
||||
documentId,
|
||||
caseId,
|
||||
docType,
|
||||
clientPosition,
|
||||
responseGenerations
|
||||
);
|
||||
const [document, setDocument] = useState(null);
|
||||
const [_docType, setDocType] = useState(docType);
|
||||
const [fetchedCase, setFetchedCase] = useState(null);
|
||||
@@ -250,10 +259,10 @@ const DocEditPage = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
console.log("docType in second useEffect", docType);
|
||||
if (!docType || docType == "combined-numbered") {
|
||||
if (!docType) {
|
||||
return;
|
||||
}
|
||||
if (responsesCreated > 1) {
|
||||
if (responseGenerations > 1) {
|
||||
setIsLoading(true);
|
||||
getCompletions(documentId, docType)
|
||||
.then((data) => {
|
||||
@@ -268,7 +277,7 @@ const DocEditPage = (props) => {
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
}
|
||||
}, [documentId, docType, docType]);
|
||||
}, [documentId, docType, responseGenerations]);
|
||||
|
||||
async function getParsedRogs(docId, docType) {
|
||||
if (!docId || !docType) {
|
||||
@@ -522,7 +531,8 @@ const DocEditPage = (props) => {
|
||||
const handleBack = () => {
|
||||
navigate(`/documents`);
|
||||
};
|
||||
|
||||
console.log("responses", responses);
|
||||
console.log("parsedRogs", parsedRogs);
|
||||
const editingContent = () => {
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user