componentised timeout applied to logged in pages

This commit is contained in:
2022-01-26 10:38:21 +00:00
parent 28586675d3
commit 2f91be126c
12 changed files with 175 additions and 46 deletions
+7 -1
View File
@@ -4,13 +4,16 @@ import Head from "next/head";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import { getAppealsTypes, getLPA } from "../../actions";
import { getProviderConfig } from "../../actions/govgateway";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import CRMError from "../../components/crmError";
import Footer from "../../components/footer";
import Header from "../../components/header";
import Search from "../../components/search";
import TimeOut from "../../components/timeout";
import { setAppealType } from "../../store/appealType/action";
import { getGovGatewayConfig } from "../../store/govgateway/action";
import { setLPA } from "../../store/lpa/action";
import { wrapper } from "../../store/store";
@@ -51,6 +54,7 @@ const Home = (props) => {
</div>
<Footer footerLinks={footerLinks} />
</div>
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
</div>
);
};
@@ -62,7 +66,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
await getAppealsTypes(),
await getLPA(),
]);
const providerConfig = await getProviderConfig();
store.dispatch(getGovGatewayConfig(providerConfig));
store.dispatch(setAppealType(appealTypeData));
store.dispatch(setLPA(lpaData));
}
@@ -77,6 +82,7 @@ const mapStateToProps = (state) => {
LPAData: state.LPAData,
//form: state.form,
accountDetails: state.accountDetails,
govGateway: state.govGateway,
};
};