diff --git a/pages/contactus.js b/pages/contactus.js index d5c6a39d..038c7796 100644 --- a/pages/contactus.js +++ b/pages/contactus.js @@ -18,6 +18,7 @@ import { import { connect } from "react-redux"; import { createCRMTask } from "../actions/services/integrationService"; import { sendEmail } from "../actions/services/notifyService"; +import { wrapper } from "../store/store"; import { useState } from "react"; @@ -526,11 +527,21 @@ const mapStateToProps = (state) => { return { typeOfContactValue, - initialValues: email ? { contactEmail: email } : {}, - petEmail: process.env.NEXT_PUBLIC_PETEMAIL + initialValues: email ? { contactEmail: email } : {} }; }; +export const getServerSideProps = wrapper.getServerSideProps( + (store) => async (ctx) => { + const { req, locale } = ctx; + return { + props: { + petEmail: process.env.PETEMAIL + } + }; + } +); + export default connect( mapStateToProps, mapDispatchToProps