Déplacement des fichiers cache et données dans le répertoire parent
Signed-off-by: Emmy D'Anello <ynerant@emy.lu>
This commit is contained in:
@ -133,19 +133,19 @@ export default function Election2024({typeResultats = "france"}) {
|
||||
const [dataSieges, setDataSieges] = useState([])
|
||||
|
||||
useEffect(() => {
|
||||
fetch("/nupes/data/resultats/europeennes2024/blocs.json").then(response => response.json())
|
||||
fetch("/data/resultats/europeennes2024/blocs.json").then(response => response.json())
|
||||
.then(data => setBlocs(data))
|
||||
fetch("/nupes/data/resultats/europeennes2024/nuances.json").then(response => response.json())
|
||||
fetch("/data/resultats/europeennes2024/nuances.json").then(response => response.json())
|
||||
.then(data => setNuances(data))
|
||||
fetch("/nupes/data/resultats/europeennes2024/listes.json").then(response => response.json())
|
||||
fetch("/data/resultats/europeennes2024/listes.json").then(response => response.json())
|
||||
.then(data => setListes(data))
|
||||
|
||||
if (typeResultats === "france") {
|
||||
fetch("/nupes/data/resultats/europeennes2024/france.json").then(response => response.json())
|
||||
fetch("/data/resultats/europeennes2024/france.json").then(response => response.json())
|
||||
.then(data => setResultats(data))
|
||||
}
|
||||
else {
|
||||
fetch(`/nupes/data/resultats/europeennes2024/${typeResultats}/${zoneId}.json`).then(response => response.json())
|
||||
fetch(`/data/resultats/europeennes2024/${typeResultats}/${zoneId}.json`).then(response => response.json())
|
||||
.then(data => setResultats(data))
|
||||
}
|
||||
}, [])
|
||||
|
Reference in New Issue
Block a user