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 CHANGED
@@ -1606,20 +1606,35 @@ function MobileHeader({
1606
1606
  const navEl = useRef(null);
1607
1607
  useLayoutEffect(() => {
1608
1608
  const body = navEl?.current?.ownerDocument?.body;
1609
- if (sideMenu) {
1610
- body?.setAttribute('style', 'overflow: hidden;');
1611
- } else {
1612
- body?.removeAttribute('style');
1613
- if (header?.effectivePrice && body) {
1614
- body?.setAttribute('style', 'margin-bottom: 130px');
1609
+ if (body) {
1610
+ console.log("here in nav");
1611
+ if (sideMenu) {
1612
+ // body?.setAttribute('style', 'overflow: hidden;');
1613
+ console.log("here in nav before", body, header);
1614
+ body.style.overflow = 'hidden';
1615
+ console.log("here in nav hidden after", body, header);
1616
+ } else {
1617
+ // body?.removeAttribute('style');
1618
+ body.style.overflow = '';
1619
+ console.log("here in nav hidden else", body, header);
1620
+ }
1621
+ if (header?.effectivePrice) {
1622
+ console.log("here in effectivePrice if before", body, header);
1623
+ body.style.marginBottom = '130px';
1624
+ console.log("here in effectivePrice if after", body, header);
1625
+ } else {
1626
+ console.log("here in effectivePrice else before", body, header);
1627
+ body.style.marginBottom = '';
1628
+ console.log("here in effectivePrice else before", body, header);
1615
1629
  }
1616
1630
  }
1617
- }, [sideMenu]);
1631
+ }, [sideMenu, header?.effectivePrice]);
1618
1632
  useEffect(() => {
1619
1633
  if (header?.effectivePrice) {
1634
+ console.log("here in use effect");
1620
1635
  const body = navEl?.current?.ownerDocument?.body;
1621
1636
  if (body) {
1622
- body?.setAttribute('style', 'margin-bottom: 130px');
1637
+ body.style.marginBottom = '130px';
1623
1638
  }
1624
1639
  }
1625
1640
  }, []);