diff --git a/frontend/src/components/LectureEnroll/LectureEnroll.jsx b/frontend/src/components/LectureEnroll/LectureEnroll.jsx index 5fc5f92..a961f7b 100644 --- a/frontend/src/components/LectureEnroll/LectureEnroll.jsx +++ b/frontend/src/components/LectureEnroll/LectureEnroll.jsx @@ -8,21 +8,39 @@ export default function LectureEnroll({ userName, enrollid, onDelete }) { const handleAccept = async (e) => { e.preventDefault(); + if (!confirm('수강신청을 승인하시겠습니까?')) { + return; + } await lectureEnrollAccept(enrollid); onDelete(enrollid); }; const handleCancel = async (e) => { e.preventDefault(); + if (!confirm('수강신청을 거절하시겠습니까?')) { + return; + } await lectureEnrollCancel(enrollid); onDelete(enrollid); }; return (
-

{userName}

- - + {userName} +
+ + +
); } diff --git a/frontend/src/components/LectureEnroll/LectureEnroll.module.css b/frontend/src/components/LectureEnroll/LectureEnroll.module.css index 76d5110..07c5cbf 100644 --- a/frontend/src/components/LectureEnroll/LectureEnroll.module.css +++ b/frontend/src/components/LectureEnroll/LectureEnroll.module.css @@ -1,13 +1,44 @@ .enrollLink { - border-radius: 8px; - width: 100%; display: flex; justify-content: space-between; - box-sizing: border-box; + align-items: center; + border-radius: 8px; + width: 100%; padding: 16px 20px; - transition: background-color 0.25s; + box-sizing: border-box; } -.enrollLink:hover { - background-color: var(--background-secondary); +.buttonWrapper { + display: flex; + gap: 8px; +} + +.accept, +.reject { + display: flex; + justify-content: center; + align-items: center; + gap: 8px; + padding: 8px 16px; + border-radius: 8px; + border: 1px solid var(--border-color); + background-color: var(--background); + font-size: 14px; + font-weight: 500; + line-height: 1.4; + + cursor: pointer; + transition: + border-color 0.1s, + color 0.1s; +} + +.accept:hover { + border-color: var(--info-color); + color: var(--info-color); +} + +.reject:hover { + border-color: var(--error-color); + color: var(--error-color); } diff --git a/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx b/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx index f5963eb..0ebb69c 100644 --- a/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx +++ b/frontend/src/pages/LectureEnrollPage/LectureEnrollPage.jsx @@ -24,14 +24,15 @@ export default function QuestionListPage() { title="수강신청관리" canCreate={false} > - {lectures.map?.((lecture) => ( - - ))} + {lectures.length && + lectures.map?.((lecture) => ( + + ))} ); }