MCPcopy Create free account
hub / github.com/Codehagen/Badget / updateDimensions

Function updateDimensions

src/components/ui/dot-pattern.tsx:80–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79 useEffect(() => {
80 const updateDimensions = () => {
81 if (containerRef.current) {
82 const { width, height } = containerRef.current.getBoundingClientRect();
83 setDimensions({ width, height });
84 }
85 };
86
87 updateDimensions();
88 window.addEventListener("resize", updateDimensions);

Callers 1

DotPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected