From 7a989ce3e19ed9b1bb67761f57fcea92bbeec0eb Mon Sep 17 00:00:00 2001 From: christian Date: Sat, 2 Nov 2024 23:41:12 +0100 Subject: [PATCH] better working yes --- app/routes/CropSelector.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routes/CropSelector.tsx b/app/routes/CropSelector.tsx index 2b7e16b..4cc0c21 100644 --- a/app/routes/CropSelector.tsx +++ b/app/routes/CropSelector.tsx @@ -26,9 +26,10 @@ export default function CropSelector() { setContainerHeight(containerRef.current.offsetHeight); } } + updateContainerSize(); window.addEventListener('resize', updateContainerSize); return () => window.removeEventListener('resize', updateContainerSize); - }, [containerRef]) + }, []) useEffect(() => {