componentised timeout applied to logged in pages
This commit is contained in:
@@ -26,6 +26,9 @@ import {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
} from "../../store/watchedCases/action";
|
||||
import TimeOut from "../../components/timeout";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages, watchedCases } = props;
|
||||
@@ -56,6 +59,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -89,7 +93,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
await getSearchDetails(searchResultsObj),
|
||||
await getDetails(watchedCases, "myWatchedCases"),
|
||||
]);
|
||||
|
||||
const providerConfig = await getProviderConfig();
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch(query.q));
|
||||
@@ -142,6 +147,7 @@ const mapStateToProps = (state) => {
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user