componentised timeout applied to logged in pages
This commit is contained in:
@@ -26,8 +26,6 @@ export default async function ApiProxy(req, res) {
|
||||
loggedInUserId +
|
||||
" and servicestage eq 1 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
||||
|
||||
console.log(queryUrl);
|
||||
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -25,6 +25,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>
|
||||
);
|
||||
};
|
||||
@@ -78,7 +82,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(setWatchedCases(watchedCases));
|
||||
@@ -129,6 +134,7 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import Case from "../../components/case";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
import Header from "../../components/header";
|
||||
import TimeOut from "../../components/timeout";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages, showRepresentations } = props;
|
||||
@@ -74,6 +75,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -92,6 +94,7 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
import Header from "../../components/header";
|
||||
import ViewAll from "../../components/myportal/viewall";
|
||||
import TimeOut from "../../components/timeout";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
@@ -44,6 +45,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -70,6 +72,7 @@ const mapStateToProps = (state) => {
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
currentView: state.currentView,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user