diff --git a/src/components/MapView.tsx b/src/components/MapView.tsx index 5250f4e..0def24a 100644 --- a/src/components/MapView.tsx +++ b/src/components/MapView.tsx @@ -100,7 +100,7 @@ const IndividualMarker = React.memo(function IndividualMarker({ } }; // eslint-disable-next-line react-hooks/exhaustive-deps -- Intentionally omitting selectedNodeId, showNodeNames, isLoadingNeighbors to prevent marker recreation - }, [map, node.node_id, node.latitude, node.longitude, node.type]); + }, [map, node.node_id, node.latitude, node.longitude, node.type, target]); // Update marker when visual properties change (but don't recreate marker) useEffect(() => { @@ -221,7 +221,7 @@ const ClusteredMarkersGroup = React.memo(function ClusteredMarkersGroup({ } }; // eslint-disable-next-line react-hooks/exhaustive-deps -- Intentionally omitting selectedNodeId, showNodeNames, isLoadingNeighbors to prevent cluster recreation - }, [map, nodes]); + }, [map, nodes, target]); // Update marker appearances when visual properties change useEffect(() => { diff --git a/src/components/MapWithChatClient.tsx b/src/components/MapWithChatClient.tsx index 169dc72..0785854 100644 --- a/src/components/MapWithChatClient.tsx +++ b/src/components/MapWithChatClient.tsx @@ -13,7 +13,7 @@ interface MapWithChatProps { nodePositions?: NodePosition[]; } -const MapView = dynamic( +const MapView = dynamic( () => import("./MapView"), { ssr: false } );