better working yes
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 29s

This commit is contained in:
christian 2024-11-02 23:41:12 +01:00
parent ff646a0cff
commit 7a989ce3e1

View File

@ -26,9 +26,10 @@ export default function CropSelector() {
setContainerHeight(containerRef.current.offsetHeight); setContainerHeight(containerRef.current.offsetHeight);
} }
} }
updateContainerSize();
window.addEventListener('resize', updateContainerSize); window.addEventListener('resize', updateContainerSize);
return () => window.removeEventListener('resize', updateContainerSize); return () => window.removeEventListener('resize', updateContainerSize);
}, [containerRef]) }, [])
useEffect(() => { useEffect(() => {