From 58f4d16bd4515e482746f9ccbe9947386078d8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EA=B8=B0=EC=98=81?= Date: Fri, 9 Aug 2024 16:37:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=9D=BC=EC=9A=B0=ED=84=B0=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98,=20=EC=8B=9C=EA=B0=84=20=ED=91=9C=EC=8B=9C=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95,=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EB=93=9C=EB=B0=94=20=EC=9D=BC=EB=B6=80=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Layout/LectureLayout.jsx | 26 +++---------------- .../StudentReportDetailPage.jsx | 4 +-- .../TeacherReportsetDetailPage.jsx | 8 +++--- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/Layout/LectureLayout.jsx b/frontend/src/components/Layout/LectureLayout.jsx index 2800313..beabfd3 100644 --- a/frontend/src/components/Layout/LectureLayout.jsx +++ b/frontend/src/components/Layout/LectureLayout.jsx @@ -1,7 +1,7 @@ import styles from './LectureLayout.module.css'; import { Outlet, useParams } from 'react-router-dom'; import LectureHeader from '../LectureHeader/LectureHeader'; -import { SideBar, SideLink, SideItem } from '../SideBar'; +import { SideBar, SideLink } from '../SideBar'; import MaxWidthLayout from './MaxWidthLayout'; import { Suspense, useEffect } from 'react'; import useBoundStore from '../../store'; @@ -61,18 +61,11 @@ export default function LectureLayout() { 자유게시판 {userType === 'student' && 퀴즈 성적} {userType === 'teacher' && 퀴즈 만들기} - {userType === 'teacher' && 수강신청관리} + {userType === 'teacher' && 수강생 관리} - {userType === 'teacher' && ( - - - - )} {userType === 'teacher' && ( + 퀴즈 성적 보기 - 퀴즈 목록 - - )} - {userType === 'student' && ( - - - )} diff --git a/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx b/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx index 51b188d..c3a4b3f 100644 --- a/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx +++ b/frontend/src/pages/StudentReportDetailPage/StudentReportDetailPage.jsx @@ -5,7 +5,7 @@ import { useStudentReportDetail } from '../../hooks/api/useStudentReportDetail'; import { QuizDetailCard } from '../../components/QuizForm'; export default function StudentReportDetailPage() { - const { reportId } = useParams(); + const { lectureId, reportId } = useParams(); const { data } = useStudentReportDetail(reportId); const report = data.data; console.log(report); @@ -15,7 +15,7 @@ export default function StudentReportDetailPage() {
diff --git a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx index 8a66c76..f8bf80b 100644 --- a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx +++ b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx @@ -1,13 +1,11 @@ import { ArticleLink } from '../../components/ArticleLink'; import ArticleBoard from '../../components/ArticleBoard/ArticleBoard'; import { useReportSetDetail } from '../../hooks/api/useReportSetDetail'; -import { useReportSetDelete } from '../../hooks/api/useReportSetDelete'; -import { useParams, useNavigate } from 'react-router-dom'; +import { useParams } from 'react-router-dom'; export default function TeacherReportsetDetailPage() { const { reportsetId } = useParams(); - const navigate = useNavigate(); - const { reportsetDelete } = useReportSetDelete(); + const { data } = useReportSetDetail(reportsetId); const reports = data?.data; @@ -26,7 +24,7 @@ export default function TeacherReportsetDetailPage() { ? `${report.name} - 미응시` : `${report.name} - ${report.title} 점수: ${report.correctCount}/${report.allCount}` } - sub={`${new Date(report.testAt).toLocaleDateString()} ${new Date(report.testAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`} + sub={`${new Date(report.date).toLocaleDateString()} ${new Date(report.date).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`} to={`../report/${report.reportId}`} /> );