diy-template-components 2.0.95 → 2.0.96

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
@@ -1622,12 +1622,18 @@ function MobileHeader({
1622
1622
  const navEl = React.useRef(null);
1623
1623
  React.useLayoutEffect(() => {
1624
1624
  const body = navEl?.current?.ownerDocument?.body;
1625
- if (sideMenu) {
1626
- body?.setAttribute('style', 'overflow: hidden;');
1627
- } else {
1628
- body?.removeAttribute('style');
1629
- if (header?.effectivePrice && body) {
1630
- body?.setAttribute('style', 'margin-bottom: 130px');
1625
+ if (body) {
1626
+ if (sideMenu) {
1627
+ // body?.setAttribute('style', 'overflow: hidden;');
1628
+ body.style.overflow = 'hidden';
1629
+ } else {
1630
+ // body?.removeAttribute('style');
1631
+ body.style.overflow = '';
1632
+ }
1633
+ if (header?.effectivePrice) {
1634
+ body.style.marginBottom = '130px';
1635
+ } else {
1636
+ body.style.marginBottom = '';
1631
1637
  }
1632
1638
  }
1633
1639
  }, [sideMenu]);