refactor phase 3a components chunk 1 targeted actions imports

This commit is contained in:
2026-03-12 12:13:29 +00:00
parent be59237ec9
commit a0a633a9ea
14 changed files with 208 additions and 186 deletions
+5 -5
View File
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
import React, { useState } from "react";
import { connect } from "react-redux";
import { Field, formValueSelector, reduxForm } from "redux-form";
import { updatePassword } from "../../actions";
import { updatePassword } from "../../actions/services/accountService";
const RenderTextfield = ({
id,
@@ -60,7 +60,7 @@ const ChangePassword = (props) => {
handleSubmit,
value,
setPasswordUpdated,
passwordUpdated,
passwordUpdated
} = props;
let { t, lang } = useTranslation();
@@ -158,7 +158,7 @@ const mapStateToProps = (state) => {
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
accountDetails: state.accountDetails,
accountDetails: state.accountDetails
//form: state.form,
};
};
@@ -167,7 +167,7 @@ const mapDispatchToProps = (dispatch) => {
return {
setCurrentSection: (currentSection) => {
dispatch(setCurrentSection(currentSection));
},
}
};
};
@@ -179,6 +179,6 @@ export default connect(
)(
reduxForm({
form: "changepasswordForm",
destroyOnUnmount: false,
destroyOnUnmount: false
})(ChangePassword)
);
@@ -3,7 +3,7 @@ import Link from "next/link";
import { useRouter } from "next/router";
import React, { useEffect } from "react";
import { connect } from "react-redux";
import { updateAccount } from "../../actions";
import { updateAccount } from "../../actions/services/accountService";
import { setCookie } from "nookies";
const PersonalDetailsComplete = (props) => {
@@ -11,7 +11,7 @@ const PersonalDetailsComplete = (props) => {
handleSubmit,
value,
setRegisterFormComplete,
setAccountCreatedComplete,
setAccountCreatedComplete
} = props;
let { t, lang } = useTranslation();
@@ -41,7 +41,7 @@ const PersonalDetailsComplete = (props) => {
console.log("=============== pref lang", prefLang);
setCookie(null, "pedw_locale", userLang, {
path: "/",
maxAge: 60 * 60 * 24 * 365,
maxAge: 60 * 60 * 24 * 365
});
console.log("Set cookie to:", userLang);
@@ -79,7 +79,7 @@ const mapStateToProps = (state) => {
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
accountDetails: state.accountDetails,
accountDetails: state.accountDetails
//form: state.form,
};
};
@@ -88,7 +88,7 @@ const mapDispatchToProps = (dispatch) => {
return {
setCurrentSection: (currentSection) => {
dispatch(setCurrentSection(currentSection));
},
}
};
};
+10 -7
View File
@@ -8,7 +8,10 @@ import { connect } from "react-redux";
import { setAccCr, setLogout } from "../../store/accountDetails/action";
import { createAccount, getEmailAccountCheck } from "../../actions";
import {
createAccount,
getEmailAccountCheck
} from "../../actions/services/accountService";
const RegisterComplete = (props) => {
const {
@@ -18,7 +21,7 @@ const RegisterComplete = (props) => {
value,
setRegisterFormComplete,
setAccountCreatedComplete,
setAccCr,
setAccCr
} = props;
let { t, lang } = useTranslation();
@@ -34,7 +37,7 @@ const RegisterComplete = (props) => {
// was an appellant "pinswg_typeofinvolvement": 846040001,
Object.assign(accountBody, {
"pinswg_typeofinvolvement": 846040061,
"pinswg_typeofinvolvement": 846040061
});
accountBody = _.omit(accountBody, ["custom_password_check"]);
@@ -105,9 +108,9 @@ const RegisterComplete = (props) => {
<p className="govuk-body">
<a
onClick={() => {
setRegisterFormComplete(false),
(setRegisterFormComplete(false),
setAccountCreatedComplete(false),
setAccCr(false);
setAccCr(false));
}}
className="govuk-link"
>
@@ -130,7 +133,7 @@ const mapStateToProps = (state) => {
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
accountDetails: state.accountDetails,
accountDetails: state.accountDetails
//form: state.form,
};
};
@@ -142,7 +145,7 @@ const mapDispatchToProps = (dispatch) => {
},
setLogout: () => {
dispatch(setLogout());
},
}
};
};