import React, { useState } from "react"; import { Doughnut } from "react-chartjs-2"; import { Chart, ArcElement } from "chart.js"; import styles from "./StatPage.module.css"; import Button from "./../../components/ui/button/button"; // Enregistrer les éléments nécessaires Chart.register(ArcElement); function StatPage() { const [months, setMonths] = useState(3); const [participationRate, setParticipationRate] = useState(89); const incompleteEvents = [ { title: "Événement A", tasks: "Préparation des flyers" }, { title: "Événement B", tasks: "Réservation de la salle" }, { title: "Événement C", tasks: "Communication sur les réseaux" }, ]; const pendingMembers = [ { name: "Antoine Ordonneau" }, { name: "Giovanni Josserand" }, { name: "Quentin T'Jampens" }, ]; const handleValidate = (name) => { console.log(`Valider ${name}`); }; const handleReject = (name) => { console.log(`Refuser ${name}`); }; const chartData = { labels: ["Progress", "Background"], datasets: [ { data: [participationRate, 100 - participationRate], backgroundColor: ["#1e60f9ff", "#ffffffff"], borderWidth: 0, weight:10, cutout: "90%", circumference: 360, rotation: -90, }, ], }; const chartOptions = { responsive: true, plugins: { legend: { display: false, }, tooltip: { enabled: false, }, }, animation: { animateScale: true, animateRotate: true, }, }; return (
{participationRate}%

Événements incomplets

{incompleteEvents.map((event, index) => (

{event.title}

{event.tasks}

))}

Membres en attente de validation

{pendingMembers.map((member, index) => (

{member.name}

))}
); } export default StatPage;