diy-template-components 5.14.0 → 5.16.0

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
@@ -349,7 +349,7 @@ const useSectionStyles$b = createUseStyles(theme => ({
349
349
  bottom: 0,
350
350
  left: 0,
351
351
  width: '100%',
352
- zIndex: '10000'
352
+ zIndex: '100'
353
353
  }
354
354
  },
355
355
  mobileAppNameClass: {
@@ -10914,7 +10914,7 @@ const SingleVideoSlide$1 = props => {
10914
10914
  currencySymbol
10915
10915
  } = props;
10916
10916
  const showCourseInstallmentData = data?.courseOverviewData;
10917
- const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments?.[0]?.installmentPrice;
10917
+ const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments[0].installmentPrice;
10918
10918
  const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
10919
10919
  const checkForShowDiscount = () => {
10920
10920
  if (props.data.endDate === null || checkIfOfferIsValid()) {
@@ -13154,6 +13154,13 @@ function StickyCta({
13154
13154
  window.addEventListener('resize', onResize);
13155
13155
  return () => window.removeEventListener('resize', onResize);
13156
13156
  }, []);
13157
+
13158
+ // Must run on every path so hook count is stable (Rules of Hooks)
13159
+ useEffect(() => {
13160
+ if (p.type !== 'sticky') return;
13161
+ document.body.classList.add('has-sticky-cta');
13162
+ return () => document.body.classList.remove('has-sticky-cta');
13163
+ }, [p.type]);
13157
13164
  const editHintBlock = showEditHint ? /*#__PURE__*/React.createElement("div", {
13158
13165
  "data-section": "sticky-cta-edit-hint",
13159
13166
  style: {
@@ -13212,10 +13219,6 @@ function StickyCta({
13212
13219
  // type === 'sticky' – use primary Button (same as other sections) linking to WhatsApp
13213
13220
  const barStyle = getStickyBarStyle(breakpoint, theme);
13214
13221
  const textStyle = getStickyTextStyle(breakpoint, theme);
13215
- useEffect(() => {
13216
- document.body.classList.add('has-sticky-cta');
13217
- return () => document.body.classList.remove('has-sticky-cta');
13218
- }, []);
13219
13222
  const stickyBarPaddingStyles = `
13220
13223
  body.has-sticky-cta {
13221
13224
  padding-bottom: ${STICKY_BAR_HEIGHT_BY_BREAKPOINT.mobile}px;