Fix API_BASE_URL
This commit is contained in:
		| @@ -5,8 +5,8 @@ import { Tooltip } from 'react-tooltip'; | ||||
| import { useQuery } from '@tanstack/react-query'; | ||||
| import axios from 'axios'; | ||||
| import { geoCentroid } from 'd3-geo'; | ||||
| import { getDetalleSeccion } from '../apiService'; | ||||
| import type { ResultadoDetalleSeccion } from '../apiService'; | ||||
| import { getDetalleSeccion, API_BASE_URL, assetBaseUrl } from '../apiService'; | ||||
| import { type ResultadoDetalleSeccion } from '../apiService'; | ||||
| import './MapaBsAs.css'; | ||||
|  | ||||
| // --- Interfaces y Tipos --- | ||||
| @@ -25,7 +25,6 @@ type SeccionGeography = { | ||||
| }; | ||||
|  | ||||
| // --- Constantes --- | ||||
| const API_BASE_URL = 'http://localhost:5217/api'; | ||||
| const DEFAULT_MAP_COLOR = '#E0E0E0'; | ||||
| const CATEGORIAS: Categoria[] = [{ id: 5, nombre: 'Senadores' }, { id: 6, nombre: 'Diputados' }]; | ||||
| const SECCION_ID_TO_ROMAN: Record<string, string> = { '1': 'I', '2': 'II', '3': 'III', '4': 'IV', '5': 'V', '6': 'VI', '7': 'VII', '8': 'VIII' }; | ||||
| @@ -102,7 +101,7 @@ const MapaBsAsSecciones = () => { | ||||
|  | ||||
|     const { data: geoData, isLoading: isLoadingGeo } = useQuery<any>({ | ||||
|         queryKey: ['mapaGeoDataSecciones'], | ||||
|         queryFn: async () => (await axios.get('./secciones-electorales-pba.topojson')).data, | ||||
|         queryFn: async () => (await axios.get(`${assetBaseUrl}/secciones-electorales-pba.topojson`)).data, | ||||
|     }); | ||||
|  | ||||
|     const { data: resultadosData, isLoading: isLoadingResultados } = useQuery<ResultadoMapaSeccion[]>({ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user