mutliple raise reps defects dates or button not showing

This commit is contained in:
2024-05-23 11:54:56 +01:00
parent a5d7fe2b74
commit 5022afe05d
7 changed files with 61 additions and 13 deletions
+13
View File
@@ -29,6 +29,8 @@ import {
setLoggedInUserId,
} from "../../store/accountDetails/action";
import { setSearch } from "../../store/search/action";
import { setShowReps } from "../../store/currentView/action";
import { wrapper } from "../../store/store";
import {
setWatchedCases,
@@ -81,6 +83,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
const { cookies } = req;
let loggedInUser = cookies.pinsUser;
const showLoginCheck = process.env.SHOWLOGIN || false;
let thisSession = await getSession(ctx);
if (!thisSession) {
@@ -109,6 +113,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
await getDetails(watchedCases, "myWatchedCases"),
]);
const showLoginCheck = process.env.SHOWLOGIN || false;
const showReps = process.env.SHOWREPRESENTATIONS || false;
store.dispatch(setShowReps(showReps, showLoginCheck));
store.dispatch(setAccountDetails(accountDetails));
store.dispatch(setSearchResults(searchResultsObj));
store.dispatch(setSearchDetails(searchDetailsObj));
@@ -116,6 +124,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setWatchedCasesDetails(watchedCasesDetails));
store.dispatch(setSearch(Object.entries(query)));
}
return {
props: {
showLoginCheck: showLoginCheck,
},
};
}
);
+1
View File
@@ -82,6 +82,7 @@ const Home = (props) => {
}
showRepresentations={props.currentView.showReps}
currentView={props.currentView}
showLoginCheck={props.currentView.showLogin}
/>
</div>
<Footer