@sikka/hawa 0.12.10-next → 0.12.11-next
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/dist/index.js +9 -7
- package/dist/index.mjs +7 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6702,13 +6702,15 @@ var useBreakpoint = function() {
|
|
|
6702
6702
|
setBreakpoint((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
|
|
6703
6703
|
};
|
|
6704
6704
|
(0, import_react33.useEffect)(function() {
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6705
|
+
if (typeof window !== "undefined") {
|
|
6706
|
+
var _window, _window1;
|
|
6707
|
+
setBreakpoint((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
|
|
6708
|
+
(_window1 = window) === null || _window1 === void 0 ? void 0 : _window1.addEventListener("resize", resize);
|
|
6709
|
+
return function() {
|
|
6710
|
+
var _window;
|
|
6711
|
+
(_window = window) === null || _window === void 0 ? void 0 : _window.removeEventListener("resize", resize);
|
|
6712
|
+
};
|
|
6713
|
+
}
|
|
6712
6714
|
}, []);
|
|
6713
6715
|
return breakpoint;
|
|
6714
6716
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -6532,12 +6532,13 @@ var useBreakpoint = () => {
|
|
|
6532
6532
|
setBreakpoint(window?.innerWidth);
|
|
6533
6533
|
};
|
|
6534
6534
|
useEffect14(() => {
|
|
6535
|
-
if (typeof window
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6535
|
+
if (typeof window !== "undefined") {
|
|
6536
|
+
setBreakpoint(window?.innerWidth);
|
|
6537
|
+
window?.addEventListener("resize", resize);
|
|
6538
|
+
return () => {
|
|
6539
|
+
window?.removeEventListener("resize", resize);
|
|
6540
|
+
};
|
|
6541
|
+
}
|
|
6541
6542
|
}, []);
|
|
6542
6543
|
return breakpoint;
|
|
6543
6544
|
};
|