diy-template-components 5.14.0 → 5.15.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 +7 -4
- package/build/index.es.js.map +1 -1
- package/build/index.js +7 -4
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -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;
|