From 1cf2d37a6c5d470aac1d4fa308fc74980b1b6351 Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Thu, 8 Aug 2024 17:56:25 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=88=98=EA=B0=95=EC=8B=A0=EC=B2=AD=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=20=EC=97=86=EC=9D=84=20=EB=95=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LectureEnrollPage/LectureEnrollPage.jsx | 16 +++++++++++----- .../LectureEnrollPage.module.css | 11 +++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) 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; +}