diff --git a/apps/admin/apis/study/studyApi.ts b/apps/admin/apis/study/studyApi.ts index 4bad8934..0ca28ce8 100644 --- a/apps/admin/apis/study/studyApi.ts +++ b/apps/admin/apis/study/studyApi.ts @@ -9,7 +9,7 @@ import type { import type { AttendanceApiResponseDto } from "types/dtos/attendance"; import type { CurriculumApiResponseDto } from "types/dtos/curriculumList"; import type { StudyBasicInfoApiResponseDto } from "types/dtos/studyBasicInfo"; -import type { PageStudyStudentApiResponseDto } from "types/dtos/studyStudent"; +import type { PaginatedStudyStudentResponseDto } from "types/dtos/studyStudent"; import type { PageableType } from "types/entities/page"; import type { StudyAnnouncementType } from "types/entities/study"; @@ -151,7 +151,7 @@ export const studyApi = { return response.data; }, getStudyStudents: async (studyId: number, pageable: PageableType) => { - const response = await fetcher.get( + const response = await fetcher.get( `/mentor/studies/${studyId}/students`, { next: { tags: [tags.students] }, diff --git a/apps/admin/app/students/_components/StudentPagination.tsx b/apps/admin/app/students/_components/StudentPagination.tsx index 5848dd17..5c40cd19 100644 --- a/apps/admin/app/students/_components/StudentPagination.tsx +++ b/apps/admin/app/students/_components/StudentPagination.tsx @@ -1,11 +1,11 @@ -import type { PageStudyStudentApiResponseDto } from "types/dtos/studyStudent"; +import type { PaginatedStudyStudentResponseDto } from "types/dtos/studyStudent"; import Pagination from "wowds-ui/Pagination"; const StudentPagination = ({ pageInfo, handleClickChangePage, }: { - pageInfo: Omit | null; + pageInfo: Omit | null; handleClickChangePage: (nextPage: number) => void; }) => { if (!pageInfo || !pageInfo.numberOfElements) return null; diff --git a/apps/admin/hooks/fetch/useFetchStudents.ts b/apps/admin/hooks/fetch/useFetchStudents.ts index 92eb1471..43296d8d 100644 --- a/apps/admin/hooks/fetch/useFetchStudents.ts +++ b/apps/admin/hooks/fetch/useFetchStudents.ts @@ -1,7 +1,7 @@ import { studyApi } from "apis/study/studyApi"; import { useEffect, useState } from "react"; import type { - PageStudyStudentApiResponseDto, + PaginatedStudyStudentResponseDto, StudyStudentApiResponseDto, } from "types/dtos/studyStudent"; @@ -14,13 +14,13 @@ const useFetchStudents = ( page: number ): { studentList: StudyStudentApiResponseDto[] | []; - pageInfo: Omit | null; + pageInfo: Omit | null; } => { const [studentList, setStudentList] = useState< StudyStudentApiResponseDto[] | [] >([]); const [pageInfo, setPageInfo] = useState | null>(null); diff --git a/apps/admin/types/dtos/studyStudent.ts b/apps/admin/types/dtos/studyStudent.ts index 38da75d2..5ba49468 100644 --- a/apps/admin/types/dtos/studyStudent.ts +++ b/apps/admin/types/dtos/studyStudent.ts @@ -21,7 +21,7 @@ export interface StudyStudentApiResponseDto { attendanceRate: number; } -export interface PageStudyStudentApiResponseDto { +export interface PaginatedStudyStudentResponseDto { totalElements: number; totalPages: number; size: number;