remove unused imports
This commit is contained in:
+10
-31
@@ -5,20 +5,18 @@ import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
getRepsFromBlob,
|
||||
getAwaitingSubmissionFromBlob,
|
||||
createContainerProxy,
|
||||
getAwaitingSubmission,
|
||||
getAwaitingSubmissionFromBlob,
|
||||
getCase,
|
||||
getIP,
|
||||
getMyCases,
|
||||
getMyLPACases,
|
||||
getMyRepresentations,
|
||||
getPersonalAccount,
|
||||
getPortalModuleDetails,
|
||||
getWatchedCases,
|
||||
consoleLogger,
|
||||
getCase,
|
||||
getPortalLogin,
|
||||
createContainerProxy,
|
||||
getIP,
|
||||
getPortalModuleDetails,
|
||||
getRepsFromBlob,
|
||||
getWatchedCases,
|
||||
} from "../../actions";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
@@ -33,9 +31,10 @@ import {
|
||||
} from "../../store/accountDetails/action";
|
||||
import {
|
||||
setAwaitingSubmission,
|
||||
setAwaitingSubmissionFromBlob,
|
||||
setAwaitingSubmissionDetails,
|
||||
setAwaitingSubmissionFromBlob,
|
||||
} from "../../store/awaitingSubmission/action";
|
||||
import { setShowReps } from "../../store/currentView/action";
|
||||
import { setMyCases, setMyCasesDetails } from "../../store/myCases/action";
|
||||
import {
|
||||
setMyRepresentations,
|
||||
@@ -43,7 +42,6 @@ import {
|
||||
setMySubmittedReps,
|
||||
setMySubmittedRepsDetails,
|
||||
} from "../../store/myRepresentations/action";
|
||||
import { setShowReps } from "../../store/currentView/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import {
|
||||
setWatchedCases,
|
||||
@@ -142,7 +140,7 @@ const Home = (props) => {
|
||||
</Head>
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName={t("common:service-name")} />
|
||||
<Header />
|
||||
<div className="govuk-width-container">
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<MyPortal
|
||||
@@ -318,13 +316,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
myCasesDetails,
|
||||
watchedCasesDetails,
|
||||
mySubmittedRepsDetails,
|
||||
//awaitingSubmissionDetails,
|
||||
myRepresentationsDetails,
|
||||
] = await Promise.all([
|
||||
await getDetails(myCases, "myCases"),
|
||||
await getDetails(filteredWatchedCases, "myWatchedCases"),
|
||||
await getDetails(mySubmittedReps, "mySubmittedReps"),
|
||||
//await getDetails(awaitingSubmission, "awaitingSubmission"),
|
||||
await getDetails(myRepresentations, "myRepresentations"),
|
||||
]);
|
||||
|
||||
@@ -365,27 +361,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const getDetails = (resultsObj, detailsType) => {
|
||||
let detailsArr = [];
|
||||
//console.log(
|
||||
// "//////////////////////////////////\n",
|
||||
// resultsObj,
|
||||
// //"\n",
|
||||
// detailsType,
|
||||
// "\n//////////////////////////////////\n"
|
||||
// );
|
||||
|
||||
resultsObj =
|
||||
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
||||
|
||||
//console.log(
|
||||
// "////////////////////////////////// resultsobj\n",
|
||||
// detailsType,
|
||||
// "\n",
|
||||
// resultsObj.length + "\n//////////////////////////////////\n"
|
||||
// );
|
||||
|
||||
if (detailsType == "myRepresentations") {
|
||||
const repsObj = resultsObj.map((searchDetail, index) => {
|
||||
//console.log(".......... ", searchDetail);
|
||||
detailsArr.push(
|
||||
getCase(searchDetail["incidentID"]).then((data) => {
|
||||
let caseID = "";
|
||||
@@ -402,8 +383,6 @@ const getDetails = (resultsObj, detailsType) => {
|
||||
];
|
||||
break;
|
||||
case "awaitingSubmission":
|
||||
caseID = data.ticketnumber;
|
||||
break;
|
||||
case "myRepresentations":
|
||||
caseID = data.ticketnumber;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user