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
+28 -64
View File
@@ -1,42 +1,36 @@
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 _ from "lodash";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import { useRouter } from "next/router";
import { useCallback, useEffect, useState } from "react";
import { connect } from "react-redux";
import transLookup from "../../data/lookuptranslations.json";
import PaginationControl from "./pagination";
import { useState, useEffect, useCallback } from "react";
import {
getBasicDNSSearchPaged,
getBasicSearchDetailsPaged,
} from "../../actions";
import data from "../../data/collections.json";
import { getBasicDNSSearchPaged } from "../../actions";
import {
setSearchResults,
setSearchDetails,
} from "../../store/searchOutput/action";
import { getSearchDetailsPaged, getFormCollectionByID } from "../utils";
import {
currentViewActionTypes,
setCurrentReference,
setCurrentPage,
} from "../../store/currentView/action";
import GoogleMapReact from "google-map-react";
import { parseCookies, setCookie, destroyCookie } from "nookies";
import { parseCookies } from "nookies";
import OSPoint from "ospoint";
import {
createWatchedCases,
deleteWatchedCases,
getWatchedCasesProxy,
} from "../../actions";
import {
setCurrentPage,
setCurrentReference,
} from "../../store/currentView/action";
import {
setSearchDetails,
setSearchResults,
} from "../../store/searchOutput/action";
import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import {
createWatchedCases,
getWatchedCasesProxy,
getPortalModuleDetailsProxy,
deleteWatchedCases,
} from "../../actions";
import OSPoint from "ospoint";
import { getDetailsProxy, getSearchDetailsPaged } from "../utils";
const DNSSearchResults = (props) => {
const {
@@ -166,7 +160,7 @@ const DNSSearchResults = (props) => {
.then(() => {
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases").then((data) => {
getDetailsProxy(data, "myWatchedCases").then((data) => {
setWatchedCasesDetails(data);
});
});
@@ -190,45 +184,15 @@ const DNSSearchResults = (props) => {
.then(() => {
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases").then((data) => {
setWatchedCasesDetails(data);
});
getDetailsProxy(data, "myWatchedCases").then(
(data) => {
setWatchedCasesDetails(data);
}
);
});
});
};
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);
};
const ResultsView = (resultsArr) => {
return (
<div className="govuk-grid-row govuk-!-margin-top-9">