diy-template-components 2.0.95 → 2.0.97
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 +23 -8
- package/build/index.es.js.map +1 -1
- package/build/index.js +23 -8
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1622,20 +1622,35 @@ function MobileHeader({
|
|
|
1622
1622
|
const navEl = React.useRef(null);
|
|
1623
1623
|
React.useLayoutEffect(() => {
|
|
1624
1624
|
const body = navEl?.current?.ownerDocument?.body;
|
|
1625
|
-
if (
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
body
|
|
1625
|
+
if (body) {
|
|
1626
|
+
console.log("here in nav");
|
|
1627
|
+
if (sideMenu) {
|
|
1628
|
+
// body?.setAttribute('style', 'overflow: hidden;');
|
|
1629
|
+
console.log("here in nav before", body, header);
|
|
1630
|
+
body.style.overflow = 'hidden';
|
|
1631
|
+
console.log("here in nav hidden after", body, header);
|
|
1632
|
+
} else {
|
|
1633
|
+
// body?.removeAttribute('style');
|
|
1634
|
+
body.style.overflow = '';
|
|
1635
|
+
console.log("here in nav hidden else", body, header);
|
|
1636
|
+
}
|
|
1637
|
+
if (header?.effectivePrice) {
|
|
1638
|
+
console.log("here in effectivePrice if before", body, header);
|
|
1639
|
+
body.style.marginBottom = '130px';
|
|
1640
|
+
console.log("here in effectivePrice if after", body, header);
|
|
1641
|
+
} else {
|
|
1642
|
+
console.log("here in effectivePrice else before", body, header);
|
|
1643
|
+
body.style.marginBottom = '';
|
|
1644
|
+
console.log("here in effectivePrice else before", body, header);
|
|
1631
1645
|
}
|
|
1632
1646
|
}
|
|
1633
|
-
}, [sideMenu]);
|
|
1647
|
+
}, [sideMenu, header?.effectivePrice]);
|
|
1634
1648
|
React.useEffect(() => {
|
|
1635
1649
|
if (header?.effectivePrice) {
|
|
1650
|
+
console.log("here in use effect");
|
|
1636
1651
|
const body = navEl?.current?.ownerDocument?.body;
|
|
1637
1652
|
if (body) {
|
|
1638
|
-
body
|
|
1653
|
+
body.style.marginBottom = '130px';
|
|
1639
1654
|
}
|
|
1640
1655
|
}
|
|
1641
1656
|
}, []);
|