From 7b972cf4f809828e03327ef00ba388c3fbfec303 Mon Sep 17 00:00:00 2001 From: minwucho Date: Fri, 9 Aug 2024 16:35:08 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20StudentReport=20Page=20=EB=A6=AC?= =?UTF-8?q?=ED=8F=AC=ED=8A=B8=EC=B9=B4=EB=93=9C=20=EC=95=88=EB=82=98?= =?UTF-8?q?=EC=98=A4=EB=8A=94=EA=B1=B0=20=EC=88=98=EC=A0=95=20=EC=8B=9C?= =?UTF-8?q?=ED=97=98=20=ED=95=9C=EB=B2=88=EB=8F=84=20=EC=95=88=20=EB=B3=B8?= =?UTF-8?q?=20=EC=83=81=ED=83=9C=EC=97=90=EC=84=9C=20=EC=A0=91=EA=B7=BC=20?= =?UTF-8?q?=EC=8B=9C=20=EC=97=90=EB=9F=AC=20=EC=95=88=EB=82=98=EA=B2=8C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StudentReportPage/StudentReportPage.jsx | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/frontend/src/pages/StudentReportPage/StudentReportPage.jsx b/frontend/src/pages/StudentReportPage/StudentReportPage.jsx index c9bfe2b..0531158 100644 --- a/frontend/src/pages/StudentReportPage/StudentReportPage.jsx +++ b/frontend/src/pages/StudentReportPage/StudentReportPage.jsx @@ -9,11 +9,10 @@ export default function StudentReportPage() { const { lectureId } = useParams(); const { data } = useStudentReports(lectureId); const reports = data?.data; - console.log(reports); const totalCounts = reports.reduce?.( (acc, report) => { - if (acc.allCount > 0) { + if (report.allCount > 0) { acc.correctCount += report.correctCount; acc.allCount += report.allCount; } @@ -27,24 +26,26 @@ export default function StudentReportPage() { title="퀴즈 성적" canCreate={false} > -
-
- {reports.map?.((report) => ( - +
+ {reports.map?.((report) => ( + + ))} +
+
+ - ))} +
-
- -
-
+ )} ); }