reps wip
This commit is contained in:
@@ -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));
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user