Removed proxy and added api calls, has gov gateway auth

This commit is contained in:
2022-01-20 10:56:26 +00:00
parent 6f37064eba
commit 5a536e158c
127 changed files with 5829 additions and 3097 deletions
+30 -12
View File
@@ -17,9 +17,10 @@ import jsonpath from "jsonpath";
import { reduxForm, formValueSelector } from "redux-form";
import RegisterForm from "../../components/account/registerform";
import { dehashString, hashAPIPath } from "../../actions";
const Home = (props) => {
const { footerLinks, formData } = props;
const { footerLinks, formData, loggedInUserEmail } = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -97,6 +98,9 @@ const Home = (props) => {
setAccountCreatedComplete={
setAccountCreatedComplete
}
loggedInUserEmail={
loggedInUserEmail
}
/>
</div>
{registerFormComplete != true ||
@@ -151,17 +155,31 @@ const Home = (props) => {
);
};
// export const getServerSideProps = wrapper.getServerSideProps(
// (store) =>
// async ({ query, req, res }) => {
// const appealTypeData = await getAppealsTypes();
// const lpaData = await getLPA();
// console.log("appeal types", appealTypeData);
// console.log("lpa typeswwwww", lpaData);
// store.dispatch(setAppealType(appealTypeData));
// store.dispatch(setLPA(lpaData));
// }
// );
export const getServerSideProps = wrapper.getServerSideProps(
(store) =>
async ({ query, req, res }) => {
// const appealTypeData = await getAppealsTypes();
// const lpaData = await getLPA();
// console.log("appeal types", appealTypeData);
// console.log("lpa typeswwwww", lpaData);
// store.dispatch(setAppealType(appealTypeData));
// store.dispatch(setLPA(lpaData));
let hasRegistrationEmail = typeof query.id != "undefined";
let loginEmailStr = "";
if (hasRegistrationEmail == true) {
loginEmailStr = dehashString(query.id);
console.log(loginEmailStr);
}
return {
props: {
loggedInUserEmail: loginEmailStr,
},
};
}
);
const mapStateToProps = (state) => {
return {