Fix Nombre CABA

This commit is contained in:
2025-10-24 12:28:33 -03:00
parent 21002445b2
commit 8d7f5c1db6
6 changed files with 7 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ const formatDateTime = (dateString: string | undefined | null) => {
};
export const HomeCarouselProvincialWidget = ({ eleccionId, categoriaId, titulo }: Props) => {
const [selectedProvince, setSelectedProvince] = useState<OptionType | null>({ value: '01', label: 'Capital Federal' });
const [selectedProvince, setSelectedProvince] = useState<OptionType | null>({ value: '01', label: 'CABA' });
const { data: provincias = [], isLoading: isLoadingProvincias } = useQuery<CatalogoItem[]>({
queryKey: ['provincias'],

View File

@@ -30,7 +30,7 @@ interface ViewConfig {
const PROVINCE_VIEW_CONFIG: Record<string, { desktop: ViewConfig; mobile?: ViewConfig }> = {
"BUENOS AIRES": { desktop: { center: [-60.5, -37.3], zoom: 5 }, mobile: { center: [-60, -38], zoom: 5.5 } },
"SANTA CRUZ": { desktop: { center: [-69.5, -49.3], zoom: 5 }, mobile: { center: [-69.5, -50], zoom: 4 } },
"CAPITAL FEDERAL": { desktop: { center: [-58.44, -34.65], zoom: 150 } },
"CABA": { desktop: { center: [-58.44, -34.65], zoom: 150 } },
"CHUBUT": { desktop: { center: [-68.5, -44.5], zoom: 5.5 }, mobile: { center: [-68, -44.5], zoom: 4.5 } },
"SANTA FE": { desktop: { center: [-61, -31.2], zoom: 6 }, mobile: { center: [-61, -31.5], zoom: 7.5 } },
"CORRIENTES": { desktop: { center: [-58, -29], zoom: 7 }, mobile: { center: [-57.5, -28.8], zoom: 9 } },
@@ -278,7 +278,7 @@ export const MapaNacional = ({ eleccionId, categoriaId, nivel, nombreAmbito, nom
<Geographies geography={geoDataNacional}>
{({ geographies }: { geographies: AmbitoGeography[] }) => geographies.map((geo) => {
const nombreNormalizado = normalizarTexto(geo.properties.nombre);
const esCABA = nombreNormalizado === 'CAPITAL FEDERAL';
const esCABA = nombreNormalizado === 'CABA';
const resultado = resultadosNacionalesPorNombre.get(nombreNormalizado);
const esProvinciaActiva = provinciaDistritoId && resultado?.ambitoId === provinciaDistritoId;
@@ -321,7 +321,7 @@ export const MapaNacional = ({ eleccionId, categoriaId, nivel, nombreAmbito, nom
{nivel === 'pais' && (
<div id="caba-lupa-anchor" className={styles.cabaMagnifierContainer} style={lupaStyle} ref={lupaRef}>
{(() => {
const resultadoCABA = resultadosNacionalesPorNombre.get("CAPITAL FEDERAL");
const resultadoCABA = resultadosNacionalesPorNombre.get("CABA");
const fillColor = resultadoCABA?.colorGanador || DEFAULT_MAP_COLOR;
const handleClick = () => {
if (resultadoCABA) {

View File

@@ -50,7 +50,7 @@ export const MapaProvincial = ({ eleccionId, categoriaId, distritoId, nombreProv
if (municipioGeo) {
const municipioFeature = feature(geoData, municipioGeo);
const centroid = geoCentroid(municipioFeature);
if (nombreProvincia.toUpperCase() === 'CAPITAL FEDERAL') {
if (nombreProvincia.toUpperCase() === 'CABA') {
onCalculatedCenter(centroid as PointTuple, 180);
} else {
onCalculatedCenter(centroid as PointTuple, 10);
@@ -60,7 +60,7 @@ export const MapaProvincial = ({ eleccionId, categoriaId, distritoId, nombreProv
}, [nivel, nombreMunicipioSeleccionado, geoData, onCalculatedCenter]);
const resultadosPorNombre = new Map<string, ResultadoMapaDto>(mapaData.map(d => [normalizarTexto(d.ambitoNombre), d]));
const esCABA = normalizarTexto(nombreProvincia) === "CAPITAL FEDERAL";
const esCABA = normalizarTexto(nombreProvincia) === "CABA";
return (
<Geographies geography={geoData}>