import React from 'react'; import { CircularProgressbar, buildStyles } from 'react-circular-progressbar'; import 'react-circular-progressbar/dist/styles.css'; export default function GradesStatsCircle({ grades }) { // grades : { [competence_id]: grade } const total = Object.keys(grades).length; const acquired = Object.values(grades).filter((g) => g === 3).length; const inProgress = Object.values(grades).filter((g) => g === 2).length; const notAcquired = Object.values(grades).filter((g) => g === 1).length; const notEvaluated = Object.values(grades).filter((g) => g === 0).length; // Pourcentage d'acquis const percent = total ? Math.round((acquired / total) * 100) : 0; return (