Welsh Gov GEL spot check udpates and switch for login box

This commit is contained in:
2021-11-05 11:54:36 +00:00
parent 3566da1989
commit 1acb84959b
40 changed files with 132 additions and 78 deletions
+15 -2
View File
@@ -17,7 +17,7 @@ import { getIncidents } from "../actions";
import { parseCookies } from "nookies";
const Home = (props) => {
const { footerLinks, pages } = props;
const { footerLinks, pages, showLogin } = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -78,7 +78,7 @@ const Home = (props) => {
<Header courseName="Appeals Casework Portal" />
<div className="govuk-width-container">
<ServiceBanner />
<Main pages={pages} />
<Main pages={pages} showLogin={showLogin} />
</div>
<Footer footerLinks={footerLinks} />
</div>
@@ -86,4 +86,17 @@ const Home = (props) => {
);
};
export const getServerSideProps = wrapper.getServerSideProps(
(store) => async (ctx) => {
const { query, req, res } = ctx;
const showLoginCheck = process.env.SHOWLOGIN || false;
console.log("Show login module: ", showLoginCheck);
return {
props: { showLogin: showLoginCheck },
};
}
);
export default Home; //connect(mapStateToProps)(Home);