show login boolean in redux store
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
setAccountDetails,
|
||||
setContainerID,
|
||||
} from "../store/accountDetails/action";
|
||||
import { setShowReps } from "../store/currentView/action";
|
||||
import { wrapper } from "../store/store";
|
||||
import { getSession, useSession, signIn, signOut } from "next-auth/react";
|
||||
|
||||
@@ -159,7 +160,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
const showMapCheck = process.env.SHOWMAPS || false;
|
||||
const showReps = process.env.SHOWREPRESENTATIONS || false;
|
||||
store.dispatch(setShowReps(showReps, showLoginCheck));
|
||||
|
||||
console.log("server checks :", showReps, showLoginCheck);
|
||||
let hasLoginCode = thisSession != null;
|
||||
|
||||
console.log("server side has session:", thisSession != null);
|
||||
|
||||
@@ -90,9 +90,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
]);
|
||||
|
||||
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));
|
||||
store.dispatch(setShowReps(showReps, showLoginCheck));
|
||||
|
||||
searchResultsObj =
|
||||
searchResultsObj.status == 502
|
||||
|
||||
Reference in New Issue
Block a user