Skip to content

Commit

Permalink
fix: resumes query 없을 때 처리 (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeminhee119 authored Dec 2, 2023
1 parent 4583df6 commit bb2a464
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/queries/resume/delete/useDeleteResume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const useDeleteResume = () => {
await queryClient.cancelQueries({ queryKey: TARGET_QUERY_KEY });
const previousResumes = queryClient.getQueryData(TARGET_QUERY_KEY);
queryClient.setQueryData(TARGET_QUERY_KEY, (old: MyResume[]) => {
if (!old) {
return;
}
return old.filter((resume) => resume.id !== parseInt(resumeId));
});
return { previousResumes };
Expand Down

0 comments on commit bb2a464

Please sign in to comment.