diff --git a/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx b/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx index 1b42488..f3f8a1b 100644 --- a/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx +++ b/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx @@ -10,7 +10,7 @@ export default function LectureEnrollPage() { const { data } = useLectureEnroll(lectureId); const [newStudents, setNewStudents] = useState([]); const [students, setStudents] = useState([]); - console.log(data); + useEffect(() => { if (data?.data) { setNewStudents(data.data[1]); @@ -31,7 +31,7 @@ export default function LectureEnrollPage() { title="수강신청 관리" canCreate={false} > - {newStudents.length && + {newStudents.length > 0 ? ( newStudents.map?.((student) => ( - ))} + )) + ) : ( +
수강 대기중인 학생이 없어요
+ )}

전체 수강생 관리

- {students.length && + {students.length > 0 ? ( students.map?.((student) => ( - ))} + )) + ) : ( +
현재 수강생이 없어요
+ )}
); diff --git a/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.module.css b/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.module.css index 0742727..a4b7844 100644 --- a/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.module.css +++ b/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.module.css @@ -4,3 +4,14 @@ font-weight: 700; padding-left: 20px; } + +.emptyMessage { + display: flex; + justify-content: center; + align-items: center; + font-size: 16px; + line-height: 1.2; + font-weight: 400; + color: var(--text-color-tertiary); + padding: 40px 0; +}