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 { connect } from "react-redux";
|
||||||
import { createCRMTask } from "../actions/services/integrationService";
|
import { createCRMTask } from "../actions/services/integrationService";
|
||||||
import { sendEmail } from "../actions/services/notifyService";
|
import { sendEmail } from "../actions/services/notifyService";
|
||||||
|
import { wrapper } from "../store/store";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
@@ -526,11 +527,21 @@ const mapStateToProps = (state) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
typeOfContactValue,
|
typeOfContactValue,
|
||||||
initialValues: email ? { contactEmail: email } : {},
|
initialValues: email ? { contactEmail: email } : {}
|
||||||
petEmail: process.env.NEXT_PUBLIC_PETEMAIL
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getServerSideProps = wrapper.getServerSideProps(
|
||||||
|
(store) => async (ctx) => {
|
||||||
|
const { req, locale } = ctx;
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
petEmail: process.env.PETEMAIL
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
|
|||||||
Reference in New Issue
Block a user