diff --git a/app/components/page/CatalogPage.vue b/app/components/page/CatalogPage.vue index becf1e0..99d8ac7 100644 --- a/app/components/page/CatalogPage.vue +++ b/app/components/page/CatalogPage.vue @@ -272,21 +272,6 @@ watch(() => props.selectedId, (uuid) => { } }) -// Watch hoveredId and fly to it -watch(() => props.hoveredId, (uuid) => { - if (uuid && props.withMap) { - // Try direct match first - let item = itemsWithCoords.value.find(i => i.uuid === uuid) - // If not found, try matching by orderUuid (for mapItems with separate source/dest points) - if (!item) { - item = itemsWithCoords.value.find(i => i.uuid === `${uuid}-source` || (i as any).orderUuid === uuid) - } - if (item) { - mapRef.value?.flyTo(item.latitude, item.longitude, 8) - mobileMapRef.value?.flyTo(item.latitude, item.longitude, 8) - } - } -}) // Expose flyTo for external use const flyTo = (lat: number, lng: number, zoom = 8) => { diff --git a/app/composables/useClusteredNodes.ts b/app/composables/useClusteredNodes.ts index 2930e51..f43b580 100644 --- a/app/composables/useClusteredNodes.ts +++ b/app/composables/useClusteredNodes.ts @@ -10,7 +10,7 @@ export interface MapBounds { } export function useClusteredNodes(transportType?: Ref) { - const { $geoClient } = useNuxtApp() + const { client } = useApolloClient('publicGeo') const clusteredNodes = ref([]) const loading = ref(false) @@ -18,7 +18,7 @@ export function useClusteredNodes(transportType?: Ref) { const fetchClusters = async (bounds: MapBounds) => { loading.value = true try { - const { data } = await $geoClient.query({ + const { data } = await client.query({ query: GetClusteredNodesDocument, variables: { west: bounds.west,