From 2bbe0e19aaa8b371d6428f918e9409220af3681a Mon Sep 17 00:00:00 2001 From: minwucho Date: Tue, 13 Aug 2024 16:08:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=95=EC=9D=98=20=EC=A0=9C=EB=AA=A9?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EB=B0=94=EB=A1=9C=20=EC=95=88=EB=B0=94?= =?UTF-8?q?=EB=80=8C=EB=8A=94=EA=B1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/LectureEditPage/LectureEditPage.jsx | 3 +++ .../TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/LectureEditPage/LectureEditPage.jsx b/frontend/src/pages/LectureEditPage/LectureEditPage.jsx index 2137b43..e72a944 100644 --- a/frontend/src/pages/LectureEditPage/LectureEditPage.jsx +++ b/frontend/src/pages/LectureEditPage/LectureEditPage.jsx @@ -1,11 +1,13 @@ import { LectureForm } from '../../components/LectureForm'; import { useLectureEdit } from '../../hooks/api/useLectureEdit'; import { useParams, useNavigate, useLocation } from 'react-router-dom'; +import { useLectureInfo } from '../../hooks/api/useLectureInfo'; export default function LecutreEditPage() { const { lectureId } = useParams(); const location = useLocation(); const initialData = location.state.from; + const lectureInfo = useLectureInfo(lectureId); const navigate = useNavigate(); const { lectureEdit } = useLectureEdit(); @@ -13,6 +15,7 @@ export default function LecutreEditPage() { const handleSubmit = async (lectureObject) => await lectureEdit(lectureId, lectureObject) .then(() => { + lectureInfo.refetch(); navigate('..'); }) .catch(() => {}); diff --git a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx index 7479d54..658fd40 100644 --- a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx +++ b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx @@ -22,7 +22,7 @@ export default function TeacherReportsetDetailPage() { title={ report.correctCount == -1 ? `${report.name} - 미응시` - : `${report.name} - ${report.title} 점수: ${report.correctCount}/${report.allCount}` + : `${report.name} - 점수: ${report.correctCount}/${report.allCount}` } sub={`${new Date(report.date).toLocaleDateString()} ${new Date(report.date).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`} to={`../report/${report.reportId}`}