diff --git a/frontend/src/queries/projects/useUploadImageFolderFileQuery.ts b/frontend/src/queries/projects/useUploadImageFolderFileQuery.ts index a1535a4..6684641 100644 --- a/frontend/src/queries/projects/useUploadImageFolderFileQuery.ts +++ b/frontend/src/queries/projects/useUploadImageFolderFileQuery.ts @@ -1,20 +1,10 @@ import { uploadImageFolderFile } from '@/api/imageApi'; import { useMutation } from '@tanstack/react-query'; +import { UploadFolderParams } from '@/types/uploadTypes'; export default function useUploadImageFolderFileQuery() { return useMutation({ - mutationFn: ({ - memberId, - projectId, - folderId, - files, - progressCallback, - }: { - memberId: number; - projectId: number; - folderId: number; - files: File[]; - progressCallback: (progress: number) => void; - }) => uploadImageFolderFile(memberId, projectId, folderId, files, progressCallback), + mutationFn: ({ memberId, projectId, folderId, files, progressCallback }: UploadFolderParams) => + uploadImageFolderFile(memberId, projectId, folderId, files, progressCallback), }); } diff --git a/frontend/src/queries/projects/useUploadImageZipQuery.ts b/frontend/src/queries/projects/useUploadImageZipQuery.ts index c342dd7..d9bd238 100644 --- a/frontend/src/queries/projects/useUploadImageZipQuery.ts +++ b/frontend/src/queries/projects/useUploadImageZipQuery.ts @@ -1,20 +1,10 @@ import { uploadImageZip } from '@/api/imageApi'; import { useMutation } from '@tanstack/react-query'; +import { UploadZipParams } from '@/types/uploadTypes'; export default function useUploadImageZipQuery() { return useMutation({ - mutationFn: ({ - memberId, - projectId, - folderId, - file, - progressCallback, - }: { - memberId: number; - projectId: number; - folderId: number; - file: File; - progressCallback: (progress: number) => void; - }) => uploadImageZip(memberId, projectId, folderId, file, progressCallback), + mutationFn: ({ memberId, projectId, folderId, file, progressCallback }: UploadZipParams) => + uploadImageZip(memberId, projectId, folderId, file, progressCallback), }); }