Skip to content

Commit

Permalink
refactor: 내 면접 이력에 테이블 로딩 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeHongDev committed Jul 4, 2024
1 parent 5ba30d7 commit 1d9c159
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const statusDisplay: Record<InterviewState, string> = {

const InterviewHistoryTable = () => {


const [page, setPage] = useState(1);
const {data, totalPages, refetch, isLoading} = useMyInterviewQuery(page);
const navigate = useNavigate();
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/hooks/api/interview/useMyInterviewQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -19,6 +19,6 @@ export const useMyInterviewQuery = (page: number) => {
totalPages: data?.totalPages,
data: data?.content,
refetch,
isLoading
isLoading: isLoading || isRefetching
}
}

0 comments on commit 1d9c159

Please sign in to comment.