diff --git a/src/components/PlaceCard.jsx b/src/components/PlaceCard.jsx index 40c4660..8443e1f 100644 --- a/src/components/PlaceCard.jsx +++ b/src/components/PlaceCard.jsx @@ -348,8 +348,9 @@ export function PlaceCard({ place, variant = "preview", expanded = true, onToggl // Reverse geocode to get OSM type/id if not present (e.g., basemap label clicks) useEffect(() => { if (!hasFeature('has_nominatim_details')) return - if (osmType && osmId) return + if (wikidataId) return // Prefer wikidata path for basemap features with wikidata if (placeLat == null || placeLon == null) return + if (osmType && osmId) return // Skip for dropped pins - they get reverse geocoded by MapView if (place?.source === 'map_click') return @@ -368,7 +369,7 @@ export function PlaceCard({ place, variant = "preview", expanded = true, onToggl } }) return () => controller.abort() - }, [placeLat, placeLon, osmType, osmId, place?.source]) + }, [wikidataId, placeLat, placeLon, osmType, osmId, place?.source]) useEffect(() => { @@ -393,7 +394,6 @@ export function PlaceCard({ place, variant = "preview", expanded = true, onToggl }, [osmType, osmId, placeLat, placeLon]) useEffect(() => { - if (osmType && osmId) return if (!wikidataId) return const controller = new AbortController() fetchPlaceByWikidata(wikidataId, controller.signal).then((data) => {