Merge branch 'fe/editLectureFix' into 'frontend'
[Front-end] fix: 강의 제목 수정 바로 안바뀌는거 수정 See merge request s11-webmobile1-sub2/S11P12A701!193
This commit is contained in:
commit
0c312da22c
@ -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(() => {});
|
||||
|
@ -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}`}
|
||||
|
Loading…
Reference in New Issue
Block a user