added logout functions to clear store
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// 404.js
|
||||
import Link from "next/link";
|
||||
|
||||
export default function FourOhFour() {
|
||||
return (
|
||||
<>
|
||||
<h1>404 - Page Not Found</h1>
|
||||
<Link href="/">
|
||||
<a>Go back home</a>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import _ from "lodash";
|
||||
import Link from "next/link";
|
||||
import Head from "next/head";
|
||||
import Header from "../components/header";
|
||||
import Banner from "../components/banner";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
|
||||
import Footer from "../components/footer";
|
||||
import { useSelector, shallowEqual, connect } from "react-redux";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { setLogout } from "../store/accountDetails/action";
|
||||
|
||||
const LogOut = (props) => {
|
||||
const { footerLinks, pages, setLogout } = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
setLogout();
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>{t("common:service-name")}</title>
|
||||
</Head>
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName="Appeals Casework Portal" />
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<h2>You have been logged out</h2>
|
||||
<div className="govuk-!-margin-top-9 govuk-!-margin-bottom-9">
|
||||
<Link href="/">Return to Planning Casework portal</Link>
|
||||
</div>
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setLogout: () => {
|
||||
dispatch(setLogout());
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(null, mapDispatchToProps)(LogOut);
|
||||
Reference in New Issue
Block a user