Fix CABA y Nombres Comunas

This commit is contained in:
2025-10-17 11:18:48 -03:00
parent fca65edefc
commit 7317c06650
3 changed files with 18 additions and 9 deletions

View File

@@ -7,9 +7,6 @@ import { geoCentroid } from 'd3-geo';
import { feature } from 'topojson-client';
import { API_BASE_URL, assetBaseUrl } from '../../../../apiService';
import type { ResultadoMapaDto, AmbitoGeography } from '../../../../types/types';
// 1. A diferencia de otros componentes, este no necesita importar el CSS
// porque no tiene un contenedor propio ni clases únicas.
// Heredará y usará las clases globales (:global) definidas en PanelNacional.module.css
const DEFAULT_MAP_COLOR = '#E0E0E0';
const normalizarTexto = (texto: string = ''): string => texto.trim().toUpperCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
@@ -65,10 +62,7 @@ export const MapaProvincial = ({ eleccionId, categoriaId, distritoId, nombreProv
{({ geographies }: { geographies: AmbitoGeography[] }) => geographies.map((geo) => {
const resultado = resultadosPorNombre.get(normalizarTexto(geo.properties.departamento));
const esSeleccionado = nombreMunicipioSeleccionado ? normalizarTexto(geo.properties.departamento) === normalizarTexto(nombreMunicipioSeleccionado) : false;
// 2. Las clases aquí NO usan el objeto 'styles' porque son clases
// que react-simple-maps necesita globalmente. El archivo CSS
// ya se encarga de estilizarlas usando :global(.rsm-geography), etc.
const classNames = [
'rsm-geography',
'mapa-provincial-geography',