diff --git a/frontend/src/Router.jsx b/frontend/src/Router.jsx
index 583d228..20db9d1 100644
--- a/frontend/src/Router.jsx
+++ b/frontend/src/Router.jsx
@@ -40,6 +40,8 @@ const PasswordResetAuthPage = lazy(async () => await import('./pages/PasswordRes
const StudentReportPage = lazy(async () => await import('./pages/StudentReportPage'));
const StudentReportDetailPage = lazy(async () => await import('./pages/StudentReportDetailPage'));
const LivePage = lazy(async () => await import('./pages/LivePage'));
+const TeacherReportsetPage = lazy(async () => await import('./pages/TeacherReportsetPage'));
+const TeacherReportsetDetailPage = lazy(async () => await import('./pages/TeacherReportsetDetailPage'));
const router = createBrowserRouter([
{
@@ -87,6 +89,14 @@ const router = createBrowserRouter([
path: 'report/:reportId',
element: ,
},
+ {
+ path: 'teacherReportsets',
+ element: ,
+ },
+ {
+ path: 'teacherReportsets/:reportsetId',
+ element: ,
+ },
{
path: 'edit',
element: ,
diff --git a/frontend/src/components/Layout/LectureLayout.jsx b/frontend/src/components/Layout/LectureLayout.jsx
index 4202c14..979f0f7 100644
--- a/frontend/src/components/Layout/LectureLayout.jsx
+++ b/frontend/src/components/Layout/LectureLayout.jsx
@@ -61,7 +61,7 @@ export default function LectureLayout() {
Q&A
자유게시판
{userType === 'student' && 퀴즈 성적}
- {userType === 'teacher' && 퀴즈}
+ {userType === 'teacher' && 퀴즈 만들기}
{userType === 'teacher' && 수강신청관리}
{userType === 'teacher' && (
@@ -88,6 +88,7 @@ export default function LectureLayout() {
강의 삭제
+ 퀴즈 목록
)}
{userType === 'student' && (
diff --git a/frontend/src/hooks/api/useReportSetDetail.js b/frontend/src/hooks/api/useReportSetDetail.js
new file mode 100644
index 0000000..60fe57d
--- /dev/null
+++ b/frontend/src/hooks/api/useReportSetDetail.js
@@ -0,0 +1,10 @@
+import { useSuspenseQuery } from '@tanstack/react-query';
+import instance from '../../utils/axios/instance';
+import { API_URL } from '../../constants';
+
+export function useReportSetDetail(reportSetId) {
+ return useSuspenseQuery({
+ queryKey: ['reportsetDetail', reportSetId],
+ queryFn: () => instance.get(`${API_URL}/report/teacher/report/${reportSetId}`),
+ });
+}
diff --git a/frontend/src/hooks/api/useReportSets.js b/frontend/src/hooks/api/useReportSets.js
new file mode 100644
index 0000000..7be43f3
--- /dev/null
+++ b/frontend/src/hooks/api/useReportSets.js
@@ -0,0 +1,10 @@
+import { useSuspenseQuery } from '@tanstack/react-query';
+import instance from '../../utils/axios/instance';
+import { API_URL } from '../../constants';
+
+export function useReportSets(lectureId) {
+ return useSuspenseQuery({
+ queryKey: ['reportsetlists', lectureId],
+ queryFn: () => instance.get(`${API_URL}/report/teacher/reportSet/${lectureId}`),
+ });
+}
diff --git a/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx
new file mode 100644
index 0000000..e8f6038
--- /dev/null
+++ b/frontend/src/pages/TeacherReportsetDetailPage/TeacherReportsetDetailPage.jsx
@@ -0,0 +1,28 @@
+import { ArticleLink } from '../../components/ArticleLink';
+import ArticleBoard from '../../components/ArticleBoard/ArticleBoard';
+import { useReportSetDetail } from '../../hooks/api/useReportSetDetail';
+import { useParams } from 'react-router-dom';
+
+export default function TeacherReportsetDetailPage() {
+ const { reportsetId } = useParams();
+ const { data } = useReportSetDetail(reportsetId);
+ const reports = data?.data;
+
+ console.log(reports);
+ return (
+
+ {reports.length &&
+ reports.map?.((report) => (
+
+ ))}
+
+ );
+}
diff --git a/frontend/src/pages/TeacherReportsetDetailPage/index.js b/frontend/src/pages/TeacherReportsetDetailPage/index.js
new file mode 100644
index 0000000..a388927
--- /dev/null
+++ b/frontend/src/pages/TeacherReportsetDetailPage/index.js
@@ -0,0 +1 @@
+export { default } from './TeacherReportsetDetailPage';
diff --git a/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx b/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx
new file mode 100644
index 0000000..d0dc206
--- /dev/null
+++ b/frontend/src/pages/TeacherReportsetPage/TeacherReportsetPage.jsx
@@ -0,0 +1,28 @@
+import { ArticleLink } from '../../components/ArticleLink';
+import ArticleBoard from '../../components/ArticleBoard/ArticleBoard';
+import { useReportSets } from '../../hooks/api/useReportSets';
+import { useParams } from 'react-router-dom';
+
+export default function TeacherReportsetPage() {
+ const { lectureId } = useParams();
+ const { data } = useReportSets(lectureId);
+ const reports = data?.data;
+
+ console.log(data);
+ return (
+
+ {reports.length &&
+ reports.map?.((report) => (
+
+ ))}
+
+ );
+}
diff --git a/frontend/src/pages/TeacherReportsetPage/index.js b/frontend/src/pages/TeacherReportsetPage/index.js
new file mode 100644
index 0000000..18e584f
--- /dev/null
+++ b/frontend/src/pages/TeacherReportsetPage/index.js
@@ -0,0 +1 @@
+export { default } from './TeacherReportsetPage';