From 8275bd164357a65dc1ffb63baf44195047aab268 Mon Sep 17 00:00:00 2001 From: Giovanni-Josserand Date: Sun, 7 Dec 2025 17:13:44 +0100 Subject: [PATCH] remove unecessary code --- package-lock.json | 28 ++++++++++++++++++++++++++++ src/pages/Events/EventsPage.jsx | 30 ++++-------------------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b8ff7e..8daf889 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1109,6 +1109,12 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kurkle/color": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz", + "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==", + "license": "MIT" + }, "node_modules/@mdx-js/react": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", @@ -2684,6 +2690,18 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chart.js": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.5.1.tgz", + "integrity": "sha512-GIjfiT9dbmHRiYi6Nl2yFCq7kkwdkp1W/lp2J99rX0yo9tgJGn3lKQATztIjb5tVtevcBtIdICNWqlq5+E8/Pw==", + "license": "MIT", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -4421,6 +4439,16 @@ "node": ">=0.10.0" } }, + "node_modules/react-chartjs-2": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.3.1.tgz", + "integrity": "sha512-h5IPXKg9EXpjoBzUfyWJvllMjG2mQ4EiuHQFhms/AjUm0XSZHhyRy2xVmLXHKrtcdrPO4mnGqRtYoD0vp95A0A==", + "license": "MIT", + "peerDependencies": { + "chart.js": "^4.1.1", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/react-docgen": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-8.0.2.tgz", diff --git a/src/pages/Events/EventsPage.jsx b/src/pages/Events/EventsPage.jsx index 02c70bf..2b458f4 100644 --- a/src/pages/Events/EventsPage.jsx +++ b/src/pages/Events/EventsPage.jsx @@ -3,6 +3,7 @@ import Event from "../../components/Event/Event.jsx"; import styles from "./EventsPage.module.css"; import ToolBar from "../../components/ToolBar/ToolBar.jsx"; import filter from "../../utils/filter.js"; +import getAllEvents from "../../utils/event/getAllEvents.js"; function EventsPage(){ @@ -12,32 +13,9 @@ function EventsPage(){ }); - const [events] = useState([ - { - id: 1, - name: "Marathon de la Ville", - description: "Participez au marathon annuel et soutenez les associations locales.", - image: null, - tasks: [ - { - name: "Inscription des participants", - start: "2018-09-24 22:21:20", - end: "2018-09-24 22:21:20", - place: "Centre sportif", - description: "Accueillir et enregistrer tous les coureurs.", - volunteers_count: 5 - }, - { - name: "Distribution des dossards", - start: "2018-09-24 22:21:20", - end: "2018-09-24 22:21:20", - place: "Salle principale", - description: "Remettre les dossards et goodies aux participants.", - volunteers_count: 3 - }, - ] - } - */ + const [events, setEvents] = useState([]); + + useEffect(() => { (async () => {