diy-template-components 1.0.9 → 1.0.11

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 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,7 +8944,10 @@ function Section({
8943
8944
  },
8944
8945
  ref: landing?.components[1]?.refSetter
8945
8946
  }, landing?.components[1]?.metadata?.text), /*#__PURE__*/React.createElement("a", {
8946
- href: landing?.components[3]?.metadata?.text,
8947
+ // href={
8948
+ // landing?.components[3]?.metadata?.text
8949
+ // }
8950
+ href: landingLink,
8947
8951
  target: "_blank",
8948
8952
  style: {
8949
8953
  textDecoration: 'none'
@@ -9116,12 +9120,20 @@ function EmailDripMarket({
9116
9120
  extraProps = {}
9117
9121
  }) {
9118
9122
  const isInitialMount = useRef(true);
9123
+ const getLandingLink = () => {
9124
+ if (landing?.components[3]?.metadata?.text) {
9125
+ return landing?.components[3]?.metadata?.text;
9126
+ } else {
9127
+ return '{{link}}';
9128
+ }
9129
+ };
9119
9130
  const convertToHtml = sectionData => {
9120
9131
  const html = ReactDOMServer.renderToStaticMarkup( /*#__PURE__*/React.createElement(Section, {
9121
9132
  nodeData: sectionData,
9122
9133
  renderHTML: true,
9123
9134
  isProceed: extraProps.isProceed,
9124
- pixel: extraProps.pixelURL
9135
+ pixel: extraProps.pixelURL,
9136
+ landingLink: getLandingLink()
9125
9137
  }));
9126
9138
  return html;
9127
9139
  };