+
{showDetails && }
diff --git a/frontend/src/containers/data-tool/content/map/index.tsx b/frontend/src/containers/data-tool/content/map/index.tsx
index cd65235d..a35b13a5 100644
--- a/frontend/src/containers/data-tool/content/map/index.tsx
+++ b/frontend/src/containers/data-tool/content/map/index.tsx
@@ -10,13 +10,11 @@ import { useQueryClient } from '@tanstack/react-query';
import { useAtomValue, useSetAtom } from 'jotai';
import Map, { ZoomControls, Attributions, DrawControls, Drawing } from '@/components/map';
-import SidebarContent from '@/components/sidebar-content';
// import Popup from '@/containers/map/popup';
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,
@@ -39,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([
@@ -133,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);
@@ -155,17 +140,16 @@ 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 (
-
+
);
};
diff --git a/frontend/src/containers/data-tool/sidebar/details-button/index.tsx b/frontend/src/containers/data-tool/sidebar/details-button/index.tsx
index f3cab1ed..60475e59 100644
--- a/frontend/src/containers/data-tool/sidebar/details-button/index.tsx
+++ b/frontend/src/containers/data-tool/sidebar/details-button/index.tsx
@@ -12,7 +12,7 @@ const DetailsButton: React.FC = () => {
return (