diy-template-components 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.es.js +12 -6
- package/build/index.es.js.map +1 -1
- package/build/index.js +12 -6
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -8769,7 +8769,8 @@ function Section({
|
|
|
8769
8769
|
customHtmlData,
|
|
8770
8770
|
renderHTML = false,
|
|
8771
8771
|
isProceed = false,
|
|
8772
|
-
pixel
|
|
8772
|
+
pixel,
|
|
8773
|
+
landingLink
|
|
8773
8774
|
}) {
|
|
8774
8775
|
const header = nodeData?.components[0];
|
|
8775
8776
|
const body = nodeData?.components[1];
|
|
@@ -8943,10 +8944,7 @@ function Section({
|
|
|
8943
8944
|
},
|
|
8944
8945
|
ref: landing?.components[1]?.refSetter
|
|
8945
8946
|
}, landing?.components[1]?.metadata?.text), /*#__PURE__*/React.createElement("a", {
|
|
8946
|
-
|
|
8947
|
-
// landing?.components[3]?.metadata?.text
|
|
8948
|
-
// }
|
|
8949
|
-
href: "{{landingLink}}",
|
|
8947
|
+
href: landingLink,
|
|
8950
8948
|
target: "_blank",
|
|
8951
8949
|
style: {
|
|
8952
8950
|
textDecoration: 'none'
|
|
@@ -9119,12 +9117,20 @@ function EmailDripMarket({
|
|
|
9119
9117
|
extraProps = {}
|
|
9120
9118
|
}) {
|
|
9121
9119
|
const isInitialMount = useRef(true);
|
|
9120
|
+
const getLandingLink = () => {
|
|
9121
|
+
if (sectionData?.components[2]?.landing?.components[3]?.metadata?.text) {
|
|
9122
|
+
return sectionData?.components[2]?.landing?.components[3]?.metadata?.text;
|
|
9123
|
+
} else {
|
|
9124
|
+
return '{{link}}';
|
|
9125
|
+
}
|
|
9126
|
+
};
|
|
9122
9127
|
const convertToHtml = sectionData => {
|
|
9123
9128
|
const html = ReactDOMServer.renderToStaticMarkup( /*#__PURE__*/React.createElement(Section, {
|
|
9124
9129
|
nodeData: sectionData,
|
|
9125
9130
|
renderHTML: true,
|
|
9126
9131
|
isProceed: extraProps.isProceed,
|
|
9127
|
-
pixel: extraProps.pixelURL
|
|
9132
|
+
pixel: extraProps.pixelURL,
|
|
9133
|
+
landingLink: getLandingLink()
|
|
9128
9134
|
}));
|
|
9129
9135
|
return html;
|
|
9130
9136
|
};
|