removed gov gateway references
This commit is contained in:
@@ -31,37 +31,6 @@ export const getProviderConfig = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getGGToken = (tokenURL, authCode, redirectUri) => {
|
||||
const tokenBody =
|
||||
"grant_type=authorization_code" +
|
||||
"&code=" +
|
||||
authCode +
|
||||
"&redirect_uri=" +
|
||||
redirectUri;
|
||||
|
||||
const basicAuthBase64 = (ggClientID + ":" + ggClientSecret).toString();
|
||||
//console.log("base64 " + Base64.encode(basicAuthBase64));
|
||||
|
||||
const tokenConfig = {
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"Authorization": "Basic " + Base64.encode(basicAuthBase64),
|
||||
},
|
||||
};
|
||||
|
||||
return axios
|
||||
.post(tokenURL, tokenBody, tokenConfig)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
// if (error.response) {
|
||||
// console.log(error.response.data);
|
||||
// console.log(error.response.status);
|
||||
// console.log(error.response.headers);
|
||||
// }
|
||||
return error.response;
|
||||
});
|
||||
};
|
||||
|
||||
export const getUserInfo = (userInfoURL, authToken) => {
|
||||
const tokenConfig = {
|
||||
headers: {
|
||||
|
||||
@@ -117,15 +117,8 @@ const RenderPasswordfield = ({
|
||||
|
||||
let Login = (props) => {
|
||||
let { t } = useTranslation();
|
||||
const {
|
||||
handleSubmit,
|
||||
pristine,
|
||||
reset,
|
||||
submitting,
|
||||
setLoggedInUserId,
|
||||
GG_CLIENT_ID,
|
||||
GG_REDIRECT_URI,
|
||||
} = props;
|
||||
const { handleSubmit, pristine, reset, submitting, setLoggedInUserId } =
|
||||
props;
|
||||
|
||||
const { data: session } = useSession();
|
||||
|
||||
@@ -135,17 +128,6 @@ let Login = (props) => {
|
||||
// const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||
const [validLoginID, setValidLoginID] = useState(null);
|
||||
|
||||
// console.log(
|
||||
// "built login url path:",
|
||||
// props.govGateway.config.authorization_endpoint +
|
||||
// "?response_type=code&scope=openid&client_id=" +
|
||||
// GG_CLIENT_ID +
|
||||
// "&redirect_uri=" +
|
||||
// GG_REDIRECT_URI +
|
||||
// "&ui_locales=" +
|
||||
// (router.locale == "cy" ? "cy" : "en-GB")
|
||||
// );
|
||||
|
||||
// let spinnerState = () => {
|
||||
// showSpinnerState == true
|
||||
// ? setShowSpinnerState(false)
|
||||
@@ -412,7 +394,6 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+2
-6
@@ -12,7 +12,7 @@ import Dns from "./homepage/dns";
|
||||
const MainHome = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const { showLogin, GG_REDIRECT_URI, GG_CLIENT_ID, session } = props;
|
||||
const { showLogin, session } = props;
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
@@ -34,11 +34,7 @@ const MainHome = (props) => {
|
||||
{showLogin == "true" && (
|
||||
<>
|
||||
<CaseSearch />
|
||||
<Login
|
||||
GG_CLIENT_ID={GG_CLIENT_ID}
|
||||
GG_REDIRECT_URI={GG_REDIRECT_URI}
|
||||
session={session}
|
||||
/>
|
||||
<Login session={session} />
|
||||
</>
|
||||
)}{" "}
|
||||
<CaseComment />
|
||||
|
||||
@@ -26,7 +26,6 @@ const MyPortal = (props) => {
|
||||
console.info("////////////\n" + "logout" + "\n////////////");
|
||||
destroyCookie({}, "pinsUser"),
|
||||
window.localStorage.clear(),
|
||||
//router.replace(props.ggLogout);
|
||||
signOut({ callbackUrl: "/logout" });
|
||||
};
|
||||
|
||||
@@ -143,7 +142,7 @@ const MyPortal = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<TimeOut ggLogout={props.ggLogout} />
|
||||
<TimeOut />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var emailAddress = req.query.emailAddress;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"contacts?$filter=emailaddress1 eq '" +
|
||||
emailAddress +
|
||||
"'&$count=true&$select=emailaddress1,contactid,pinswg_custom_password,yomifullname,firstname,lastname";
|
||||
|
||||
//console.log(req.query);
|
||||
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
? res.status(400).json()
|
||||
: typeof emailAddress != "undefined" && emailAddress.length > 0
|
||||
? axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeadersPaged(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
console.log(data);
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(consoleLogger(err));
|
||||
res.status(400).json(err);
|
||||
})
|
||||
: res.status(400).json();
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
+21
-75
@@ -4,13 +4,7 @@ import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { setCookie } from "nookies";
|
||||
import { connect } from "react-redux";
|
||||
import { getNotice, getToken, hashString } from "../actions";
|
||||
import {
|
||||
getGGToken,
|
||||
getPortalLogin,
|
||||
getProviderConfig,
|
||||
getUserInfo,
|
||||
} from "../actions/govgateway";
|
||||
import { getNotice, getToken, hashString, getPortalLogin } from "../actions";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
import Footer from "../components/footer";
|
||||
import Header from "../components/header";
|
||||
@@ -21,7 +15,6 @@ import {
|
||||
setAccountDetails,
|
||||
setContainerID,
|
||||
} from "../store/accountDetails/action";
|
||||
import { getGovGatewayConfig } from "../store/govgateway/action";
|
||||
import { wrapper } from "../store/store";
|
||||
import { getSession, useSession, signIn, signOut } from "next-auth/react";
|
||||
|
||||
@@ -32,10 +25,8 @@ const Home = (props) => {
|
||||
showLogin,
|
||||
showMap,
|
||||
loggedInUserId,
|
||||
hasGGCode,
|
||||
loginEmailStr,
|
||||
loggedInUserEmail,
|
||||
ggLocale,
|
||||
hasLoginCode,
|
||||
noticeContent,
|
||||
} = props;
|
||||
@@ -74,9 +65,7 @@ const Home = (props) => {
|
||||
}),
|
||||
router.replace({
|
||||
pathname:
|
||||
router.locale == "cy" || ggLocale == "cy"
|
||||
? "/cy/fymhorth"
|
||||
: "/myportal",
|
||||
router.locale == "cy" ? "/cy/fymhorth" : "/myportal",
|
||||
}))
|
||||
: console.log("no value in user id");
|
||||
|
||||
@@ -156,16 +145,8 @@ const Home = (props) => {
|
||||
<div className="govuk-width-container">
|
||||
{hasLoginCode ? (
|
||||
<>
|
||||
<h1>
|
||||
{ggLocale == "cy"
|
||||
? "Mewngofnodi"
|
||||
: "Logging in"}
|
||||
</h1>
|
||||
<h2>
|
||||
{ggLocale == "cy"
|
||||
? "Arhoswch os gwelwch yn dda..."
|
||||
: "Please wait..."}
|
||||
</h2>
|
||||
<h1>{t("home:logging-in-heading")}</h1>
|
||||
<h2>{t("home:logging-in-paragraph")}</h2>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@@ -174,13 +155,10 @@ const Home = (props) => {
|
||||
<NoticeBanner noticeContent={noticeContent} />
|
||||
)}
|
||||
<Main
|
||||
ggLocale={ggLocale}
|
||||
pages={pages}
|
||||
showLogin={showLogin}
|
||||
showMap={showMap}
|
||||
loggedInUserId={loggedInUserId}
|
||||
// GG_REDIRECT_URI={props.GG_REDIRECT_URI}
|
||||
// GG_CLIENT_ID={props.GG_CLIENT_ID}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
@@ -200,7 +178,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
var relayToken = await getToken();
|
||||
relayToken = relayToken.access_token;
|
||||
|
||||
console.log("\n///////////////\nauth sess:", thisSession);
|
||||
console.log("\n////////////////////\nauth sess:", thisSession);
|
||||
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
const showMapCheck = process.env.SHOWMAPS || false;
|
||||
@@ -209,13 +187,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
console.log("server side has session:", thisSession != null);
|
||||
|
||||
// let providerConfig = await getProviderConfig();
|
||||
let ggLocale =
|
||||
typeof query.ui_locales != "undefined" && query.ui_locales;
|
||||
|
||||
console.log("hasloginCode:", hasLoginCode);
|
||||
|
||||
// store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
console.log("hasloginCode:", hasLoginCode + "\n////////////////////\n");
|
||||
|
||||
const noticeContent = await getNotice();
|
||||
|
||||
@@ -228,50 +203,22 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
loginEmailStr = hashString(thisSession.user.email);
|
||||
store.dispatch(setContainerID(thisSession.user.id));
|
||||
|
||||
portalUserObj = await getPortalLogin(
|
||||
thisSession.user.email,
|
||||
relayToken
|
||||
);
|
||||
portalUserObj = await getPortalLogin(thisSession.user.email);
|
||||
} else {
|
||||
console.log("///////////////\nempty session \n///////////////\n");
|
||||
}
|
||||
|
||||
if (_.has(portalUserObj, "status") != false) {
|
||||
if (portalUserObj.status == 400) {
|
||||
return {
|
||||
redirect: {
|
||||
//destination: "/dns-not-found",
|
||||
destination: "/error",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
console.log("loggin user stuff: ", portalUserObj);
|
||||
store.dispatch(setAccountDetails(portalUserObj));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log("empty session");
|
||||
}
|
||||
console.log("///////////////\n");
|
||||
if (ggToken.status == 400) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/myportal/error",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
props: {
|
||||
ggLocale: ggLocale,
|
||||
showLogin: showLoginCheck,
|
||||
showMap: showMapCheck,
|
||||
hasSession: hasLoginCode,
|
||||
loggedInUserId: portalUserObj,
|
||||
loggedInUserEmail: loginEmailStr,
|
||||
hasLoginCode: hasLoginCode,
|
||||
noticeContent: noticeContent,
|
||||
},
|
||||
};
|
||||
}
|
||||
return {
|
||||
props: {
|
||||
showLogin: showLoginCheck,
|
||||
showMap: showMapCheck,
|
||||
hasSession: hasLoginCode,
|
||||
loggedInUserId: portalUserObj,
|
||||
loggedInUserEmail: loginEmailStr,
|
||||
hasLoginCode: hasLoginCode,
|
||||
noticeContent: noticeContent,
|
||||
},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -287,7 +234,6 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
export default connect(mapStateToProps)(Home);
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
getFilesFromBlob,
|
||||
getProgressFromBlob,
|
||||
} from "../../actions";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
@@ -38,7 +37,6 @@ import {
|
||||
setFilesForAppeal,
|
||||
} from "../../store/appealType/action";
|
||||
import { setForm } from "../../store/formData/action";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import { getPartSavedDetails } from "../../components/utils";
|
||||
import { getProgressBlobs } from "../../actions/azurestorage";
|
||||
@@ -208,7 +206,7 @@ let Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -286,8 +284,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
xmlStr = xmlStr.replace(/> <"/g, "><");
|
||||
xmlStr = xmlStr.toString();
|
||||
|
||||
const providerConfig = await getProviderConfig();
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
store.dispatch(setLoggedInUserId(loggedInUser));
|
||||
store.dispatch(setLoggedInUserEmail(loggedInUserEmail));
|
||||
store.dispatch(setAppealLPA(query.lpa));
|
||||
@@ -313,7 +309,6 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
currentView: state.currentView,
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { getAppealsTypes, getLPA, getPersonalAccount } from "../../actions";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import CRMError from "../../components/crmError";
|
||||
@@ -13,7 +12,6 @@ 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";
|
||||
import { getSession, useSession } from "next-auth/react";
|
||||
@@ -61,7 +59,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -82,8 +80,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
await getAppealsTypes(),
|
||||
await getLPA(),
|
||||
]);
|
||||
const providerConfig = await getProviderConfig();
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
|
||||
// const lpaData = require("../../data/lpa.json");
|
||||
// const appealTypeData = require("../../data/appealtypes.json");
|
||||
@@ -104,7 +100,6 @@ const mapStateToProps = (state) => {
|
||||
LPAData: state.LPAData,
|
||||
//form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@ import {
|
||||
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;
|
||||
@@ -60,7 +58,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -83,8 +81,7 @@ 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));
|
||||
@@ -136,7 +133,6 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -91,7 +91,6 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
getCase,
|
||||
} from "../../actions";
|
||||
import { createContainer } from "../../actions/azurestorage";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
@@ -33,7 +32,6 @@ import {
|
||||
setAwaitingSubmissionFromBlob,
|
||||
setAwaitingSubmissionDetails,
|
||||
} from "../../store/awaitingSubmission/action";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { setMyCases, setMyCasesDetails } from "../../store/myCases/action";
|
||||
import {
|
||||
setMyRepresentations,
|
||||
@@ -54,7 +52,6 @@ const Home = (props) => {
|
||||
watchedCases,
|
||||
awaitingSubmission,
|
||||
accountDetails,
|
||||
govGateway,
|
||||
showFileUpload,
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
@@ -144,7 +141,6 @@ const Home = (props) => {
|
||||
watchedCases={watchedCases}
|
||||
awaitingSubmission={awaitingSubmission}
|
||||
accountDetails={accountDetails}
|
||||
ggLogout={govGateway.config.end_session_endpoint}
|
||||
showFileUpload={showFileUpload}
|
||||
containerID={accountDetails.containerID}
|
||||
/>
|
||||
@@ -180,10 +176,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
//Create Storage container for logged in user
|
||||
await createContainer(thisSession.user.id);
|
||||
|
||||
let providerConfig = await getProviderConfig();
|
||||
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
|
||||
const [
|
||||
accountDetails,
|
||||
myCases,
|
||||
@@ -315,7 +307,6 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ import {
|
||||
setWatchedCasesDetails,
|
||||
} from "../../store/watchedCases/action";
|
||||
import TimeOut from "../../components/timeout";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import { getSession, useSession } from "next-auth/react";
|
||||
import {
|
||||
setAccountDetails,
|
||||
@@ -66,7 +64,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -104,9 +102,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
await getSearchDetails(searchResultsObj),
|
||||
await getDetails(watchedCases, "myWatchedCases"),
|
||||
]);
|
||||
const providerConfig = await getProviderConfig();
|
||||
store.dispatch(setAccountDetails(accountDetails));
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch(query.q));
|
||||
@@ -160,7 +156,6 @@ const mapStateToProps = (state) => {
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ const Home = (props) => {
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -72,7 +72,6 @@ const mapStateToProps = (state) => {
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
currentView: state.currentView,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
getFilesFromBlob,
|
||||
getProgressFromBlob,
|
||||
} from "../../actions";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
@@ -39,7 +38,6 @@ import {
|
||||
setFilesForAppeal,
|
||||
} from "../../store/appealType/action";
|
||||
import { setForm } from "../../store/formData/action";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import { getProgressBlobs } from "../../actions/azurestorage";
|
||||
import { getSession, useSession } from "next-auth/react";
|
||||
@@ -209,7 +207,7 @@ let Home = (props) => {
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -270,8 +268,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
xmlStr = xmlStr.replace(/> <"/g, "><");
|
||||
xmlStr = xmlStr.toString();
|
||||
|
||||
const providerConfig = await getProviderConfig();
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
store.dispatch(setLoggedInUserId(loggedInUser));
|
||||
store.dispatch(setLoggedInUserEmail(loggedInUserEmail));
|
||||
store.dispatch(setAppealLPA(query.lpa));
|
||||
@@ -297,7 +293,6 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -130,7 +130,6 @@ const mapStateToProps = (state) => {
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ import { setAppealType } from "../../store/appealType/action";
|
||||
import { setLPA } from "../../store/lpa/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import TimeOut from "../../components/timeout";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages, formData, loggedInUserIdent } = props;
|
||||
@@ -129,7 +127,7 @@ const Home = (props) => {
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
<TimeOut ggLogout={props.govGateway.config.end_session_endpoint} />
|
||||
<TimeOut />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -164,11 +162,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
console.log("wewerwe s s", accountDetails);
|
||||
|
||||
const providerConfig = await getProviderConfig();
|
||||
// const lpaData = require("../../data/lpa.json");
|
||||
// const appealTypeData = require("../../data/appealtypes.json");
|
||||
|
||||
store.dispatch(getGovGatewayConfig(providerConfig));
|
||||
store.dispatch(setAppealType(appealTypeData));
|
||||
store.dispatch(setLPA(lpaData));
|
||||
store.dispatch(setLoggedInUserId(loggedInUser));
|
||||
@@ -190,7 +186,6 @@ const mapStateToProps = (state) => {
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+1
-6
@@ -17,7 +17,6 @@ import awaitingSubmission from "./awaitingSubmission/reducer";
|
||||
import myCases from "./myCases/reducer";
|
||||
import myRepresentations from "./myRepresentations/reducer";
|
||||
import watchedCases from "./watchedCases/reducer";
|
||||
import govGateway from "./govgateway/reducer";
|
||||
|
||||
//COMBINING ALL REDUCERS
|
||||
const appReducer = combineReducers({
|
||||
@@ -32,7 +31,6 @@ const appReducer = combineReducers({
|
||||
myCases,
|
||||
myRepresentations,
|
||||
watchedCases,
|
||||
govGateway,
|
||||
form: formReducer,
|
||||
});
|
||||
|
||||
@@ -119,16 +117,13 @@ const makeStore = ({ isServer }) => {
|
||||
"myCases",
|
||||
"myRepresentations",
|
||||
"watchedCases",
|
||||
//"govGateway",
|
||||
"form",
|
||||
],
|
||||
version: 1.3,
|
||||
version: 1.4,
|
||||
storage: storage,
|
||||
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
|
||||
migrate: (state) => {
|
||||
console.log("Migration Running!");
|
||||
// console.log(state);
|
||||
|
||||
return Promise.resolve(state);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user