diy-template-components 0.2.65 → 0.2.67

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.js CHANGED
@@ -7118,6 +7118,9 @@ const SingleVideoSlide$1 = props => {
7118
7118
  };
7119
7119
  const checkIfOfferIsValid = () => moment__default["default"]().diff(moment__default["default"](props.data.offerPriceEndDate)) < 0;
7120
7120
  const checkForShowDiscount = () => {
7121
+ if (checkIfOfferIsValid() && data?.discount) {
7122
+ return true;
7123
+ }
7121
7124
  if (props.data.endDate === null || checkIfOfferIsValid()) {
7122
7125
  if (data.discount > 0 && data.offerPriceValidFor === 0) {
7123
7126
  return true;
@@ -7153,7 +7156,7 @@ const SingleVideoSlide$1 = props => {
7153
7156
  className: classes.iframeSuperContainer
7154
7157
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7155
7158
  className: classes.videoDetails
7156
- }, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && data.offerPriceValidFor > conversions && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
7159
+ }, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
7157
7160
  className: classes.bannerContainer
7158
7161
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7159
7162
  className: classes.bannerContainerText
@@ -7201,7 +7204,7 @@ const SingleVideoSlide$1 = props => {
7201
7204
  }
7202
7205
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
7203
7206
  className: classes.courseViewContainer
7204
- }, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor !== 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
7207
+ }, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor === 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
7205
7208
  className: classes.offerText
7206
7209
  }, "Offer Ends in", ' ', /*#__PURE__*/React__default["default"].createElement("span", {
7207
7210
  className: classes.courseDetailTime