diff --git a/frontend/src/containers/data-tool/content/map/index.tsx b/frontend/src/containers/data-tool/content/map/index.tsx index 4eb649aa..a35b13a5 100644 --- a/frontend/src/containers/data-tool/content/map/index.tsx +++ b/frontend/src/containers/data-tool/content/map/index.tsx @@ -15,7 +15,6 @@ import LabelsManager from '@/containers/data-tool/content/map/labels-manager'; import LayersToolbox from '@/containers/data-tool/content/map/layers-toolbox'; import { useSyncMapSettings } from '@/containers/data-tool/content/map/sync-settings'; import { cn } from '@/lib/classnames'; -import { sidebarAtom } from '@/store/data-tool'; import { drawStateAtom, layersInteractiveAtom, @@ -38,7 +37,6 @@ const DataToolMap: React.FC = () => { const setPopup = useSetAtom(popupAtom); const queryClient = useQueryClient(); const { locationCode } = useParams(); - const isSidebarOpen = useAtomValue(sidebarAtom); const hoveredPolygonId = useRef(null); const locationData = queryClient.getQueryData([ @@ -132,18 +130,6 @@ const DataToolMap: React.FC = () => { const bounds = customBbox ?? (locationData?.attributes?.bounds as LngLatBoundsLike); - useEffect(() => { - map?.easeTo({ - padding: { - top: 0, - bottom: 0, - left: isSidebarOpen ? 430 : 0, - right: 0, - }, - duration: 500, - }); - }, [isSidebarOpen, map]); - useEffect(() => { const { queryKey } = getGetLocationsQueryOptions(); const d = queryClient.getQueryData(queryKey); @@ -154,12 +140,12 @@ const DataToolMap: React.FC = () => { padding: { top: 0, bottom: 0, - left: isSidebarOpen ? 430 : 0, + left: 0, right: 0, }, }); } - }, [queryClient, locationCode, isSidebarOpen, map]); + }, [queryClient, locationCode, map]); return (