This commit is contained in:
2022-12-16 11:36:01 +00:00
parent f6d934d951
commit 98aefdd867
36 changed files with 1258 additions and 371 deletions
+14 -3
View File
@@ -7,6 +7,8 @@ import {
getBasicSearch,
getPortalModuleDetails,
getWatchedCases,
consoleLogger,
getPortalLogin,
} from "../../actions";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
@@ -76,13 +78,13 @@ export const getServerSideProps = wrapper.getServerSideProps(
const { cookies } = req;
let loggedInUser = cookies.pinsUser;
let loggedInUserCookie = cookies.pinsUser;
let thisSession = await getSession(ctx);
let [searchResultsObj, watchedCases] = await Promise.all([
let [searchResultsObj, loggedInUser] = await Promise.all([
await getBasicSearch(query.q),
await getWatchedCases(loggedInUser),
await getPortalLogin(thisSession.user.email),
]);
searchResultsObj =
@@ -96,6 +98,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
//console.log("sssss", searchResultsObj);
loggedInUser = loggedInUser.value[0].contactid;
const watchedCases = await getWatchedCases(loggedInUser);
//console.log("sssss", loggedInUser);
const [accountDetails, searchDetailsObj, watchedCasesDetails] =
await Promise.all([
await getPersonalAccount(loggedInUser),
@@ -109,6 +117,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setWatchedCases(watchedCases));
store.dispatch(setWatchedCasesDetails(watchedCasesDetails));
store.dispatch(setLoggedInUserId(loggedInUser));
thisSession != false &&
store.dispatch(setContainerID(thisSession.user.id));
}
);