()
| 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); |