From 82c85b433eca74be79f338d236331018c3d00d2a Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 8 Sep 2024 18:12:23 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20study=20->=20selectedStudy=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/app/students/page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/admin/app/students/page.tsx b/apps/admin/app/students/page.tsx index 257d88c9..7d6c5cbc 100644 --- a/apps/admin/app/students/page.tsx +++ b/apps/admin/app/students/page.tsx @@ -15,7 +15,7 @@ import { studyAtom } from "./_contexts/StudyProvider"; const StudentsPage = () => { const [studyList, setStudyList] = useState(); - const [study, setStudy] = useAtom(studyAtom); + const [selectedStudy, setSelectedStudy] = useAtom(studyAtom); useEffect(() => { const fetchData = async () => { @@ -27,15 +27,15 @@ const StudentsPage = () => { if (data && data.length && data[0]) { setStudyList(data); - setStudy({ studyId: data[0].studyId, title: data[0].title }); + setSelectedStudy({ studyId: data[0].studyId, title: data[0].title }); } } }; fetchData(); - }, [setStudy]); + }, [setSelectedStudy]); - const student = useFetchStudents(study); + const student = useFetchStudents(selectedStudy); if (!studyList) return 담당한 스터디가 없어요.; return (