watched cases and view all

This commit is contained in:
2024-02-05 15:26:13 +00:00
parent 1e1b97f2a9
commit 12d1fbc55e
15 changed files with 57 additions and 40 deletions
+10 -8
View File
@@ -40,7 +40,7 @@ import {
} from "../../store/accountDetails/action";
const Home = (props) => {
const { footerLinks, pages, watchedCases } = props;
const { footerLinks, pages, watchedCases, showLoginCheck } = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -84,6 +84,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
let thisSession = await getSession(ctx);
const showReps = process.env.SHOWREPRESENTATIONS || false;
const showLoginCheck = process.env.SHOWLOGIN || false;
store.dispatch(setShowReps(showReps, showLoginCheck));
if (!thisSession) {
console.log("not has sesssion.......");
return {
@@ -98,13 +102,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
await getPortalLogin(thisSession.user.email),
]);
const showReps = process.env.SHOWREPRESENTATIONS || false;
const showLoginCheck = process.env.SHOWLOGIN || false;
store.dispatch(setShowReps(showReps, showLoginCheck));
console.log("env var ", process.env.SHOWREPRESENTATIONS);
store.dispatch(setShowReps(showReps, showLoginCheck));
searchResultsObj =
searchResultsObj.status == 502
? {
@@ -139,6 +136,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
thisSession != false &&
store.dispatch(setContainerID(thisSession.user.id));
}
return {
props: {
showLoginCheck: showLoginCheck,
},
};
}
);