Merged PR 2532: made petemail from serverside env var
made petemail from serverside env var Related work items: #24215
This commit is contained in:
+13
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user