build fix

This commit is contained in:
2022-04-07 08:11:40 +01:00
parent 1410b0bf13
commit d63d87aa3e
6 changed files with 114 additions and 80 deletions
+20 -16
View File
@@ -2,7 +2,7 @@ import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { useState, useEffect, useRef } from "react";
import { useState, useEffect, useRef, useCallback } from "react";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import transLookup from "../../data/lookuptranslations.json";
import PaginationControl from "./pagination";
@@ -289,23 +289,27 @@ const DocumentDetails = (props) => {
selectedOption,
fieldSortState,
orderByState,
getDocumentResults,
]);
const getDocumentResults = (pageNumber, orderBy, fieldSort) => {
getSearchDocumentDetailsPaged(
props.incidentid,
pageNumber,
orderBy,
fieldSort,
selectedOption
)
.then((data) => data)
.then((data) => {
//console.log("getting details", data);
setDocumentDetails(data);
setShowSpinnerState(false);
});
};
const getDocumentResults = useCallback(
(pageNumber, orderBy, fieldSort) => {
getSearchDocumentDetailsPaged(
props.incidentid,
pageNumber,
orderBy,
fieldSort,
selectedOption
)
.then((data) => data)
.then((data) => {
//console.log("getting details", data);
setDocumentDetails(data);
setShowSpinnerState(false);
});
},
[props.incidentid, selectedOption, setDocumentDetails]
);
const getDocumentDetails = async () => {
let docObj = await getSearchDocumentDetailsPaged(