This commit is contained in:
2025-08-15 17:47:43 -03:00
parent bed4a4a638
commit 75ff9d5593

View File

@@ -1,8 +1,7 @@
// src/App.tsx
import { useState, useEffect } from 'react';
import { useState } from 'react';
import { MunicipioWidget } from './components/MunicipioWidget';
import { MunicipioSelector } from './components/MunicipioSelector';
import { getMunicipios, type MunicipioSimple } from './services/api';
import './App.css';
import { ResumenProvincialWidget } from './components/ResumenProvincialWidget';
import { BancasWidget } from './components/BancasWidget';
@@ -10,17 +9,6 @@ import { TelegramasView } from './components/TelegramasView';
function App() {
const [selectedMunicipioId, setSelectedMunicipioId] = useState<string | null>(null);
const [listaMunicipios, setListaMunicipios] = useState<MunicipioSimple[]>([]);
const [loading, setLoading] = useState(true);
useEffect(() => {
getMunicipios()
.then(setListaMunicipios)
.catch(err => console.error("Error al cargar la lista de municipios", err))
.finally(() => setLoading(false));
}, []);
if (loading) return <h1>Cargando datos iniciales...</h1>;
return (
<>