fix(dashboard): set initial size for map

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-03-20 20:52:49 +01:00
parent b59216fb7d
commit 38ff55f203

View File

@@ -70,6 +70,15 @@ const Map = ({ markers }: Props) => {
});
}, []);
useEffect(() => {
if (ref.current) {
setSize({
width: ref.current.clientWidth,
height: ref.current.clientHeight,
});
}
}, []);
const adjustSizeBasedOnZoom = (size: number) => {
const minMultiplier = 1;
const maxMultiplier = 7;