updated cookie manger added cookie policy

This commit is contained in:
2021-11-11 10:51:04 +00:00
parent f7f474dfd2
commit 9d54b0cd2d
17 changed files with 713 additions and 51 deletions
+3
View File
@@ -70,6 +70,9 @@ const Home = (props) => {
props.currentView.caseReference.appealType
}
incidentid={props.currentView.caseReference.incidentid}
representationsObj={
props.searchResultsObj.representationsObj
}
/>
</div>
<Footer footerLinks={footerLinks} />
+90
View File
@@ -0,0 +1,90 @@
import _ from "lodash";
import { useState, useEffect, useRef } from "react";
import Head from "next/head";
import Header from "../components/header";
import ServiceBanner from "../components/servicebanner";
import CookieBanner from "../components/cookieBanner";
import Breadcrumbs from "../components/breadcrumbs";
import Main from "../components/main";
import Footer from "../components/footer";
import Errorpage from "../components/errorpage";
import styles from "../styles/Home.module.css";
import { useSelector, shallowEqual, connect } from "react-redux";
import { wrapper } from "../store/store";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import { getIncidents } from "../actions";
import { parseCookies } from "nookies";
import CookiePolicy from "../components/cookiePolicy";
const CookieDetails = (props) => {
const { footerLinks, pages, showLogin } = props;
let { t, lang } = useTranslation();
const router = useRouter();
const { locale } = router;
return (
<div>
<Head>
<title>{t("common:service-name")}</title>
{/* Language by default is EN, if multilingual site this will need updated */}
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta property="og:type" content="website" />
<meta property="og:url" content={t("common:gov-wales-link")} />
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.pathname}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</Head>
<div id="page_wrapper">
<CookieBanner />
<Header courseName="Appeals Casework Portal" />
<div className="govuk-width-container">
<Breadcrumbs />
<CookiePolicy />
</div>
<Footer footerLinks={footerLinks} />
</div>
</div>
);
};
export default CookieDetails; //connect(mapStateToProps)(Home);
+20 -1
View File
@@ -16,7 +16,7 @@ import useTranslation from "next-translate/useTranslation";
import Case from "../../components/case";
const Home = (props) => {
const { footerLinks, pages } = props;
const { footerLinks, pages, showRepresentations } = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -73,6 +73,10 @@ const Home = (props) => {
props.currentView.caseReference.appealType
}
incidentid={props.currentView.caseReference.incidentid}
representationsObj={
props.searchResultsObj.representationsObj
}
showRepresentations={showRepresentations}
/>
</div>
<Footer footerLinks={footerLinks} />
@@ -81,6 +85,21 @@ const Home = (props) => {
);
};
export const getServerSideProps = wrapper.getServerSideProps(
(store) => async (ctx) => {
const { query, req, res } = ctx;
const showRepresentationsCheck =
process.env.SHOWREPRESENTATIONS || false;
console.log("Show representation module: ", showRepresentationsCheck);
return {
props: { showRepresentations: showRepresentationsCheck },
};
}
);
const mapStateToProps = (state) => {
//console.log(state);