From a1f8a0c7bf4f84749018f27fc6d608bd5e09e4bc Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 17 Nov 2024 20:35:29 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B2=AB=20=EB=B2=88=EC=A7=B8=20?= =?UTF-8?q?=EC=84=A0=ED=83=9D=EB=90=9C=20=ED=95=99=EC=83=9D=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=A0=8C=EB=8D=94=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/students/_components/OutstandingModal.tsx | 13 +++++-------- .../students/_components/StudentHeaderButtons.tsx | 6 +++--- .../_components/StudentTable/StudentList.tsx | 11 +++++++++-- apps/admin/app/students/_contexts/StudyProvider.tsx | 9 ++++++++- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/apps/admin/app/students/_components/OutstandingModal.tsx b/apps/admin/app/students/_components/OutstandingModal.tsx index 1692e819..d6907933 100644 --- a/apps/admin/app/students/_components/OutstandingModal.tsx +++ b/apps/admin/app/students/_components/OutstandingModal.tsx @@ -18,8 +18,8 @@ import { const OutstandingModal = () => { const study = useAtomValue(studyAtom); - const selectedStudents = useAtomValue(selectedStudentsAtom); - const STUDENTS_NUM = selectedStudents.length; + const { firstStudentName, students } = useAtomValue(selectedStudentsAtom); + const STUDENTS_NUM = students.length; const [outstandingStudents, setOutstandingStudents] = useAtom( outstandingStudentsAtom @@ -39,7 +39,7 @@ const OutstandingModal = () => { : studyAchievementApi.deleteStudyAchievement; const result = await fetch(study.studyId, { - studentIds: selectedStudents, + studentIds: students, achievementType: achievement, }); @@ -79,11 +79,8 @@ const OutstandingModal = () => { )} - { - // TODO: 가장 앞 사람 정보 요청 - /* 이현영 님 외{" "} */ - } - {STUDENTS_NUM}명 + {firstStudentName} 님 외{" "} + {STUDENTS_NUM - 1}명 {enabled ? (