diff --git a/pages/myportal/contactus.js b/pages/myportal/contactus.js index b503ac2d..fcefae19 100644 --- a/pages/myportal/contactus.js +++ b/pages/myportal/contactus.js @@ -13,10 +13,11 @@ import { formValueSelector, reduxForm, touch, - SubmissionError, + SubmissionError } from "redux-form"; import { connect } from "react-redux"; -import { createCRMTask, sendEmail } from "../../actions"; +import { createCRMTask } from "../../actions/services/integrationService"; +import { sendEmail } from "../../actions/services/notifyService"; import { useState } from "react"; @@ -28,7 +29,7 @@ const RenderPickList = ({ label, input, errorMsg, - meta: { touched, error }, + meta: { touched, error } }) => { let { t } = useTranslation(); @@ -318,7 +319,7 @@ let ContactUs = (props) => { const sendContactEmail = async (formValues) => { Object.assign(formValues, { "contactSubject": contactPurpose(formValues.typeOfContact).props - .children, + .children }); const reference = "PEDW-CONTACT-US"; @@ -340,7 +341,7 @@ let ContactUs = (props) => { alert("Something went wrong. Please try again later."); // Required: inform redux-form this is a submit error throw new SubmissionError({ - _error: "Failed to send email. Please try again later.", + _error: "Failed to send email. Please try again later." }); } }; @@ -367,7 +368,7 @@ let ContactUs = (props) => { alert("Something went wrong. Please try again later."); // Required: inform redux-form this is a submit error throw new SubmissionError({ - _error: "Failed to send email. Please try again later.", + _error: "Failed to send email. Please try again later." }); } }; @@ -514,7 +515,7 @@ const mapStateToProps = (state) => { accountDetails: state.accountDetails, typeOfContactValue, initialValues: email ? { contactEmail: email } : {}, - petEmail: process.env.NEXT_PUBLIC_PETEMAIL, + petEmail: process.env.NEXT_PUBLIC_PETEMAIL }; }; @@ -545,7 +546,7 @@ export default connect( ) { errorElement.scrollIntoView({ behavior: "smooth", - block: "center", + block: "center" }); errorElement.focus({ preventScroll: true }); } else { @@ -557,6 +558,6 @@ export default connect( } console.log("Redux Form onSubmitFail:", submitError); - }, + } })(ContactUs) );