refactor phase 3a myportal dns imports

This commit is contained in:
2026-03-12 09:22:17 +00:00
parent 562cffdc59
commit 548c85e339
2 changed files with 43 additions and 41 deletions
+16 -16
View File
@@ -2,14 +2,14 @@ import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import { getIP } from "../../actions/core/logger";
import { getPersonalAccount } from "../../actions/services/accountService";
import { getPortalModuleDetails } from "../../actions/services/caseService";
import {
getBasicDNSSearch,
getDNSCoords,
getIP,
getPortalModuleDetails,
getWatchedCases,
getPersonalAccount,
} from "../../actions";
getDNSCoords
} from "../../actions/services/searchService";
import { getWatchedCases } from "../../actions/services/portalService";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
@@ -18,22 +18,22 @@ import Footer from "../../components/footer";
import Header from "../../components/header";
import {
getFormCollectionByID,
getSearchDetails,
getSearchDetails
} from "../../components/utils";
import {
setLoggedInUserId,
setAccountDetails,
setAccountDetails
} from "../../store/accountDetails/action";
import { setSearch } from "../../store/search/action";
import {
setDNSCoords,
setSearchDetails,
setSearchResults,
setSearchResults
} from "../../store/searchOutput/action";
import { wrapper } from "../../store/store";
import {
setWatchedCases,
setWatchedCasesDetails,
setWatchedCasesDetails
} from "../../store/watchedCases/action";
import { getSession } from "next-auth/react";
@@ -158,13 +158,13 @@ export const getServerSideProps = wrapper.getServerSideProps(
return {
redirect: {
destination: "/auth/signin",
permanent: false,
},
permanent: false
}
};
} else {
let [accountDetails, watchedCases] = await Promise.all([
await getPersonalAccount(loggedInUser),
await getWatchedCases(loggedInUser),
await getWatchedCases(loggedInUser)
]);
// searchResultsObj =
@@ -179,7 +179,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
const showMapCheck = process.env.SHOWMAPS || false;
const [watchedCasesDetails] = await Promise.all([
await getDetails(watchedCases, "myWatchedCases"),
await getDetails(watchedCases, "myWatchedCases")
]);
const dnsCoords = await getDNSCoords();
// store.dispatch(setSearchResults(searchResultsObj));
@@ -192,7 +192,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setAccountDetails(accountDetails));
return {
props: { showMap: showMapCheck },
props: { showMap: showMapCheck }
};
}
}
@@ -239,7 +239,7 @@ const mapStateToProps = (state) => {
watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission,
accountDetails: state.accountDetails,
accountDetails: state.accountDetails
};
};