From e37af964f1ccd389cf1b38a33d521912622716fa Mon Sep 17 00:00:00 2001 From: adbusnel Date: Thu, 30 May 2024 14:42:22 +0200 Subject: [PATCH 1/2] [MOD] fixed missing 0 for multiple answers --- src/Components/Questionnaire/teacherFormContent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Questionnaire/teacherFormContent.jsx b/src/Components/Questionnaire/teacherFormContent.jsx index 1d7c0e91..d4fabe86 100644 --- a/src/Components/Questionnaire/teacherFormContent.jsx +++ b/src/Components/Questionnaire/teacherFormContent.jsx @@ -70,7 +70,7 @@ const TeacherFormContent = (props) => {
  • {answer.title}
    - {answer.count} + {answer?.count ? answer?.count : 0}
  • ))} From f594f063311f1727647a84f305d2054ff1b67e2f Mon Sep 17 00:00:00 2001 From: adbusnel Date: Thu, 30 May 2024 15:30:37 +0200 Subject: [PATCH 2/2] [MOD] fix chart --- src/Users/Student/statisticsStudent.jsx | 2 +- src/Users/Teacher/statisticsTeacher.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Users/Student/statisticsStudent.jsx b/src/Users/Student/statisticsStudent.jsx index c90e121d..f213c084 100644 --- a/src/Users/Student/statisticsStudent.jsx +++ b/src/Users/Student/statisticsStudent.jsx @@ -160,7 +160,7 @@ const StudentStatPage = () => { } else { createChart() } - }, [moodData]) + }, [moodData, chart]) const calculateStartDate = (date, filter) => { const selectedDate = new Date(date) diff --git a/src/Users/Teacher/statisticsTeacher.jsx b/src/Users/Teacher/statisticsTeacher.jsx index c3038ded..be005e2a 100644 --- a/src/Users/Teacher/statisticsTeacher.jsx +++ b/src/Users/Teacher/statisticsTeacher.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react' import HeaderComp from '../../Components/Header/headerComp' -import { Chart } from 'chart.js/auto' +import Chart from 'chart.js/auto' import '../../css/pages/homePage.scss' import '../../css/pages/statistiques.scss' import { library } from '@fortawesome/fontawesome-svg-core'