diff --git a/apps/admin/app/students/page.tsx b/apps/admin/app/students/page.tsx index 7d6c5cbc..0d957d08 100644 --- a/apps/admin/app/students/page.tsx +++ b/apps/admin/app/students/page.tsx @@ -20,15 +20,13 @@ const StudentsPage = () => { useEffect(() => { const fetchData = async () => { const adminStatus = await isAdmin(); - if (adminStatus) { - const data = adminStatus - ? await studyApi.getStudyList() - : await studyApi.getMyStudyList(); - - if (data && data.length && data[0]) { - setStudyList(data); - setSelectedStudy({ studyId: data[0].studyId, title: data[0].title }); - } + const data = adminStatus + ? await studyApi.getStudyList() + : await studyApi.getMyStudyList(); + + if (data && data.length && data[0]) { + setStudyList(data); + setSelectedStudy({ studyId: data[0].studyId, title: data[0].title }); } };