Files
Elecciones-2025/Elecciones-Web/frontend/src/App.tsx

30 lines
782 B
TypeScript
Raw Normal View History

// src/App.tsx
import { useState } from 'react';
import { MunicipioWidget } from './components/MunicipioWidget';
import { MunicipioSelector } from './components/MunicipioSelector';
import './App.css';
function App() {
const [selectedMunicipioId, setSelectedMunicipioId] = useState<string | null>(null);
return (
<>
<h1>Elecciones 2025 - Resultados en Vivo</h1>
{/* Aquí podrías poner el widget del Resumen Provincial */}
<hr />
<h2>Consulta por Municipio</h2>
<MunicipioSelector onMunicipioChange={setSelectedMunicipioId} />
{selectedMunicipioId && (
<div style={{ marginTop: '20px' }}>
<MunicipioWidget municipioId={selectedMunicipioId} />
</div>
)}
</>
);
}
export default App;