build fix
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user