Merged PR 2533: made petemail from server side var for logged in
made petemail from server side var for logged in Related work items: #24215
This commit is contained in:
@@ -527,11 +527,21 @@ const mapStateToProps = (state) => {
|
|||||||
return {
|
return {
|
||||||
accountDetails: state.accountDetails,
|
accountDetails: state.accountDetails,
|
||||||
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