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
+2 -4
View File
@@ -80,10 +80,8 @@ const Home = (props) => {
representationsObj={
props.searchResultsObj.representationsObj
}
showRepresentations={showRepresentations}
showLoginCheck={
props.currentView.caseReference.showLogin
}
showRepresentations={props.currentView.showReps}
currentView={props.currentView}
/>
</div>
<Footer footerLinks={footerLinks} />
+8
View File
@@ -40,6 +40,7 @@ import {
setMyRepresentations,
setMyRepresentationsDetails,
} from "../../store/myRepresentations/action";
import { setShowReps } from "../../store/currentView/action";
import { wrapper } from "../../store/store";
import {
setWatchedCases,
@@ -57,6 +58,7 @@ const Home = (props) => {
accountDetails,
showFileUpload,
showLoginCheck,
currentView,
} = props;
let { t, lang } = useTranslation();
@@ -148,6 +150,7 @@ const Home = (props) => {
showFileUpload={showFileUpload}
containerID={accountDetails.containerID}
showLoginCheck={showLoginCheck}
currentView={currentView}
/>
</div>
<Footer footerLinks={footerLinks} />
@@ -237,6 +240,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
? "cy"
: "en";
const showLoginCheck = process.env.SHOWLOGIN || false;
const showMapCheck = process.env.SHOWMAPS || false;
const showReps = process.env.SHOWREPRESENTATIONS || false;
store.dispatch(setShowReps(showReps, showLoginCheck));
// if (preferredLocale != ctx.locale) {
// return {
// redirect: {
+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,
},
};
}
);