diff --git a/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx b/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx
index a4e5bfd..9a7390e 100644
--- a/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx
+++ b/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx
@@ -6,9 +6,7 @@ import { QuizDetailCard } from '../../components/QuizForm';
export default function StudentReportDetailPage() {
const { reportId } = useParams();
- console.log(reportId);
const { data } = useStudentReportDetail(reportId);
- console.log(data.data);
const report = data.data;
const { allCount, correctCount, quizzes, title } = report;
const score = Math.round((100 * correctCount) / allCount);
@@ -24,9 +22,7 @@ export default function StudentReportDetailPage() {
{title}
-
- 점수 : {score}점 ( {correctCount} / {allCount} )
-
+ {allCount === 0 ? '미응시' : `점수 : ${score}점 ( ${correctCount} / ${allCount} )`}
{quizzes.map((quiz, index) => (
{
diff --git a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx
index e8f6038..dbb267d 100644
--- a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx
+++ b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx
@@ -8,21 +8,39 @@ export default function TeacherReportsetDetailPage() {
const { data } = useReportSetDetail(reportsetId);
const reports = data?.data;
- console.log(reports);
+ const formatDate = (dateArray) => {
+ const date = new Date(...dateArray.slice(0, 6));
+ return date.toLocaleString('ko-KR', {
+ year: 'numeric',
+ month: 'numeric',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ hour12: true,
+ });
+ };
+
return (
{reports.length &&
- reports.map?.((report) => (
-
- ))}
+ reports.map?.((report) => {
+ const formattedDate = formatDate(report.date);
+ return (
+
+ );
+ })}
);
}
diff --git a/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx b/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx
index d0dc206..d88a9f6 100644
--- a/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx
+++ b/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx
@@ -8,21 +8,34 @@ export default function TeacherReportsetPage() {
const { data } = useReportSets(lectureId);
const reports = data?.data;
- console.log(data);
+ const formatDate = (dateArray) => {
+ const date = new Date(...dateArray.slice(0, 6));
+ return date.toLocaleString('ko-KR', {
+ year: 'numeric',
+ month: 'numeric',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ hour12: true,
+ });
+ };
+
return (
- {reports.length &&
- reports.map?.((report) => (
+ {reports.map?.((report) => {
+ const formattedDate = formatDate(report.testAt);
+ return (
- ))}
+ );
+ })}
);
}