mutliple raise reps defects dates or button not showing
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ const Home = (props) => {
|
||||
}
|
||||
showRepresentations={props.currentView.showReps}
|
||||
currentView={props.currentView}
|
||||
showLoginCheck={props.currentView.showLogin}
|
||||
/>
|
||||
</div>
|
||||
<Footer
|
||||
|
||||
Reference in New Issue
Block a user