refactor phase 3a myportal search results imports
This commit is contained in:
@@ -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 {
|
||||
getAdvancedSearch,
|
||||
getIP,
|
||||
getPersonalAccount,
|
||||
getPortalLogin,
|
||||
getPortalModuleDetails,
|
||||
getWatchedCases,
|
||||
} from "../../actions";
|
||||
getPortalLogin
|
||||
} from "../../actions/services/accountService";
|
||||
import { getPortalModuleDetails } from "../../actions/services/caseService";
|
||||
import { getAdvancedSearch } from "../../actions/services/searchService";
|
||||
import { getWatchedCases } from "../../actions/services/portalService";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
@@ -17,17 +17,17 @@ import Header from "../../components/header";
|
||||
import SearchResults from "../../components/searchresults";
|
||||
import {
|
||||
getFormCollectionByID,
|
||||
getSearchDetails,
|
||||
getSearchDetails
|
||||
} from "../../components/utils";
|
||||
import {
|
||||
setSearchDetails,
|
||||
setSearchResults,
|
||||
setSearchResults
|
||||
} from "../../store/searchOutput/action";
|
||||
|
||||
import {
|
||||
setAccountDetails,
|
||||
setContainerID,
|
||||
setLoggedInUserId,
|
||||
setLoggedInUserId
|
||||
} from "../../store/accountDetails/action";
|
||||
import { setShowReps } from "../../store/currentView/action";
|
||||
import { setSearch } from "../../store/search/action";
|
||||
@@ -37,7 +37,7 @@ import TimeOut from "../../components/timeout";
|
||||
import { wrapper } from "../../store/store";
|
||||
import {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
setWatchedCasesDetails
|
||||
} from "../../store/watchedCases/action";
|
||||
import ServiceBanner from "../../components/myportal/servicebanner";
|
||||
|
||||
@@ -96,8 +96,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/auth/signin",
|
||||
permanent: false,
|
||||
},
|
||||
permanent: false
|
||||
}
|
||||
};
|
||||
} else {
|
||||
thisSession != false &&
|
||||
@@ -109,13 +109,13 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const [accountDetails, watchedCases] = await Promise.all([
|
||||
await getPersonalAccount(loggedInUser),
|
||||
await getWatchedCases(loggedInUser),
|
||||
await getWatchedCases(loggedInUser)
|
||||
]);
|
||||
|
||||
console.log(accountDetails);
|
||||
|
||||
const [watchedCasesDetails] = await Promise.all([
|
||||
await getDetails(watchedCases, "myWatchedCases"),
|
||||
await getDetails(watchedCases, "myWatchedCases")
|
||||
]);
|
||||
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
@@ -130,8 +130,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
}
|
||||
return {
|
||||
props: {
|
||||
showLoginCheck: showLoginCheck,
|
||||
},
|
||||
showLoginCheck: showLoginCheck
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -177,7 +177,7 @@ const mapStateToProps = (state) => {
|
||||
myCases: state.myCases,
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
awaitingSubmission: state.awaitingSubmission
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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 {
|
||||
getBasicSearch,
|
||||
getIP,
|
||||
getPersonalAccount,
|
||||
getPortalLogin,
|
||||
getPortalModuleDetails,
|
||||
getWatchedCases,
|
||||
} from "../../actions";
|
||||
getPortalLogin
|
||||
} from "../../actions/services/accountService";
|
||||
import { getPortalModuleDetails } from "../../actions/services/caseService";
|
||||
import { getBasicSearch } from "../../actions/services/searchService";
|
||||
import { getWatchedCases } from "../../actions/services/portalService";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
@@ -17,18 +17,18 @@ import Header from "../../components/header";
|
||||
import SearchResults from "../../components/searchresults";
|
||||
import {
|
||||
getFormCollectionByID,
|
||||
getSearchDetails,
|
||||
getSearchDetails
|
||||
} from "../../components/utils";
|
||||
import { setShowReps } from "../../store/currentView/action";
|
||||
import { setSearch } from "../../store/search/action";
|
||||
import {
|
||||
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";
|
||||
@@ -36,7 +36,7 @@ import TimeOut from "../../components/timeout";
|
||||
import {
|
||||
setAccountDetails,
|
||||
setContainerID,
|
||||
setLoggedInUserId,
|
||||
setLoggedInUserId
|
||||
} from "../../store/accountDetails/action";
|
||||
import ServiceBanner from "../../components/myportal/servicebanner";
|
||||
|
||||
@@ -96,12 +96,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/auth/signin",
|
||||
permanent: false,
|
||||
},
|
||||
permanent: false
|
||||
}
|
||||
};
|
||||
} else {
|
||||
let [loggedInUser] = await Promise.all([
|
||||
await getPortalLogin(thisSession.user.email),
|
||||
await getPortalLogin(thisSession.user.email)
|
||||
]);
|
||||
|
||||
//console.log("sssss", searchResultsObj);
|
||||
@@ -114,7 +114,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const [accountDetails, watchedCasesDetails] = await Promise.all([
|
||||
await getPersonalAccount(loggedInUser),
|
||||
await getDetails(watchedCases, "myWatchedCases"),
|
||||
await getDetails(watchedCases, "myWatchedCases")
|
||||
]);
|
||||
store.dispatch(setAccountDetails(accountDetails));
|
||||
store.dispatch(setSearch(query.q));
|
||||
@@ -127,8 +127,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
}
|
||||
return {
|
||||
props: {
|
||||
showLoginCheck: showLoginCheck,
|
||||
},
|
||||
showLoginCheck: showLoginCheck
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -174,7 +174,7 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user