Removed proxy and added api calls, has gov gateway auth
This commit is contained in:
+30
-12
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user