remove unused imports

This commit is contained in:
2024-06-19 06:32:38 +01:00
parent e4a1903b48
commit b0e2bb6e14
263 changed files with 1458 additions and 2693 deletions
+14 -54
View File
@@ -1,48 +1,39 @@
import { JSONPath as jsonpath } from "jsonpath-plus";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import { connect } from "react-redux";
import { JSONPath as jsonpath } from "jsonpath-plus";
import transLookup from "../../data/lookuptranslations.json";
import { getFormCollectionByID } from "../../components/utils";
import { parseCookies } from "nookies";
import { useCallback, useState } from "react";
import { connect } from "react-redux";
import {
setSearchResults,
setSearchDetails,
} from "../../store/searchOutput/action";
import { parseCookies, setCookie, destroyCookie } from "nookies";
import {
getWatchedCasesProxy,
getPortalModuleDetailsProxy,
deleteWatchedCases,
deleteAwaitingSubmissions,
deleteAwaitingSubmissionsFromBlob,
deleteMyRepresentationsFromBlob,
deleteWatchedCases,
getAwaitingSubmissionFromBlobProxy,
getAwaitingSubmissionProxy,
getRepsFromBlobProxy,
getWatchedCasesProxy,
} from "../../actions";
import { getDetailsProxy, getFormCollectionByID } from "../../components/utils";
import transLookup from "../../data/lookuptranslations.json";
import { setAwaitingSubmissionFromBlob } from "../../store/awaitingSubmission/action";
import {
setSearchDetails,
setSearchResults,
} from "../../store/searchOutput/action";
import { setAwaitingSubmissionDetails } from "../../store/awaitingSubmission/action";
import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import {
setAwaitingSubmission,
setAwaitingSubmissionDetails,
} from "../../store/awaitingSubmission/action";
import {
setCurrentLinkedCases,
setCurrentReference,
setCurrentView,
} from "../../store/currentView/action";
import {
setMyRepresentations,
setMyRepresentationsDetails,
setMySubmittedReps,
setMySubmittedRepsDetails,
} from "../../store/myRepresentations/action";
const ViewAllResults = (props) => {
@@ -808,7 +799,7 @@ const ViewAllResults = (props) => {
.then(() => {
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases")
getDetailsProxy(data, "myWatchedCases")
.then((data) => {
setWatchedCasesDetails(data);
})
@@ -822,37 +813,6 @@ const ViewAllResults = (props) => {
});
};
const getDetails = (resultsObj, detailsType) => {
//console.log(resultsObj);
let detailsArr = [];
resultsObj = resultsObj.value;
const detailsObj = resultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(
detailsType != "myWatchedCases"
? searchDetail.ticketnumber
: searchDetail[
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]
);
} else {
detailsArr.push(
getPortalModuleDetailsProxy(
getFormCollectionByID(
searchDetail.pinswg_appealcasetype
).LogicalCollectionName,
detailsType != "myWatchedCases"
? searchDetail.ticketnumber
: searchDetail[
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
return (
<>
<div className="govuk-grid-row">