From 1d9c159d0f07168a54345888942a22ac991ecaa3 Mon Sep 17 00:00:00 2001 From: JaehongDev Date: Thu, 4 Jul 2024 15:11:29 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=82=B4=20=EB=A9=B4=EC=A0=91=20?= =?UTF-8?q?=EC=9D=B4=EB=A0=A5=EC=97=90=20=ED=85=8C=EC=9D=B4=EB=B8=94=20?= =?UTF-8?q?=EB=A1=9C=EB=94=A9=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InterviewHistoryTable/InterviewHistoryTable.tsx | 1 - frontend/src/hooks/api/interview/useMyInterviewQuery.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/InterviewHistoryTable/InterviewHistoryTable.tsx b/frontend/src/components/InterviewHistoryTable/InterviewHistoryTable.tsx index 47de195..604ddb4 100644 --- a/frontend/src/components/InterviewHistoryTable/InterviewHistoryTable.tsx +++ b/frontend/src/components/InterviewHistoryTable/InterviewHistoryTable.tsx @@ -38,7 +38,6 @@ const statusDisplay: Record = { const InterviewHistoryTable = () => { - const [page, setPage] = useState(1); const {data, totalPages, refetch, isLoading} = useMyInterviewQuery(page); const navigate = useNavigate(); diff --git a/frontend/src/hooks/api/interview/useMyInterviewQuery.ts b/frontend/src/hooks/api/interview/useMyInterviewQuery.ts index f87d5d4..55f5a62 100644 --- a/frontend/src/hooks/api/interview/useMyInterviewQuery.ts +++ b/frontend/src/hooks/api/interview/useMyInterviewQuery.ts @@ -7,7 +7,7 @@ const size = 10; export const useMyInterviewQuery = (page: number) => { - const {data, refetch, isLoading} = useQuery({ + const {data, refetch, isLoading, isRefetching} = useQuery({ queryKey: ['my interview'], queryFn: () => myInterview({page: page - 1, size}), placeholderData: keepPreviousData, @@ -19,6 +19,6 @@ export const useMyInterviewQuery = (page: number) => { totalPages: data?.totalPages, data: data?.content, refetch, - isLoading + isLoading: isLoading || isRefetching } }