geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
21 lines (20 loc) • 541 B
JavaScript
import { useState as t, useEffect as d } from "react";
const s = () => {
const [n, i] = t({
width: typeof window < "u" ? window.innerWidth : 0,
height: typeof window < "u" ? window.innerHeight : 0
});
return d(() => {
const e = () => {
i({
width: window.innerWidth,
height: window.innerHeight
});
};
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
}, []), n;
};
export {
s as useCanvasDimensions
};
//# sourceMappingURL=index.es101.js.map