Merge branch 'FE/fixRouter' into 'frontend'
[Front-End]fix: 라우터 오류, 시간 표시 오류 수정, 사이드바 일부 제거 See merge request s11-webmobile1-sub2/S11P12A701!153
This commit is contained in:
commit
82c57c093d
@ -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() {
|
||||
<SideLink to={'freeboard'}>자유게시판</SideLink>
|
||||
{userType === 'student' && <SideLink to={'report'}>퀴즈 성적</SideLink>}
|
||||
{userType === 'teacher' && <SideLink to={'quiz'}>퀴즈 만들기</SideLink>}
|
||||
{userType === 'teacher' && <SideLink to={'enroll'}>수강신청관리</SideLink>}
|
||||
{userType === 'teacher' && <SideLink to={'enroll'}>수강생 관리</SideLink>}
|
||||
</SideBar>
|
||||
{userType === 'teacher' && (
|
||||
<SideBar title="수업 정보">
|
||||
<SideItem
|
||||
name="수강생"
|
||||
sub="총 12명"
|
||||
/>
|
||||
</SideBar>
|
||||
)}
|
||||
{userType === 'teacher' && (
|
||||
<SideBar title={'강의 정보 관리'}>
|
||||
<SideLink to={'teacherReportsets'}>퀴즈 성적 보기</SideLink>
|
||||
<SideLink
|
||||
to={'edit'}
|
||||
state={lectureData}
|
||||
@ -87,19 +80,6 @@ export default function LectureLayout() {
|
||||
강의 삭제
|
||||
</span>
|
||||
</li>
|
||||
<SideLink to={'teacherReportsets'}>퀴즈 목록</SideLink>
|
||||
</SideBar>
|
||||
)}
|
||||
{userType === 'student' && (
|
||||
<SideBar title="내 학습">
|
||||
<SideItem
|
||||
name="진도율"
|
||||
sub="2 / 12"
|
||||
/>
|
||||
<SideItem
|
||||
name="퀴즈 정답률"
|
||||
sub="80%"
|
||||
/>
|
||||
</SideBar>
|
||||
)}
|
||||
</aside>
|
||||
|
@ -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() {
|
||||
<div className={styles.wrapper}>
|
||||
<header className={styles.header}>
|
||||
<Link
|
||||
to={'..'}
|
||||
to={`/lecture/${lectureId}/class/report`}
|
||||
className={styles.goBack}
|
||||
>
|
||||
<BackIcon />
|
||||
|
@ -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}`}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user