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:
2024-06-09 17:51:24 +02:00
parent dec9f414ac
commit b3a7955a9d
4 changed files with 9 additions and 7 deletions

View File

@ -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))
}
}, [])