Fix: build 실패 해결, refetch 선택적으로 받을 수 있도록 변경
This commit is contained in:
parent
9979bb26f6
commit
9472860218
@ -13,7 +13,7 @@ export default function ImageUploadFileForm({
|
|||||||
folderId,
|
folderId,
|
||||||
}: {
|
}: {
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onRefetch: () => void;
|
onRefetch?: () => void;
|
||||||
onFileCount: (fileCount: number) => void;
|
onFileCount: (fileCount: number) => void;
|
||||||
projectId: number;
|
projectId: number;
|
||||||
folderId: number;
|
folderId: number;
|
||||||
@ -34,6 +34,12 @@ export default function ImageUploadFileForm({
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleRefetch = () => {
|
||||||
|
if (onRefetch) {
|
||||||
|
onRefetch();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const newFiles = event.target.files;
|
const newFiles = event.target.files;
|
||||||
|
|
||||||
@ -82,7 +88,7 @@ export default function ImageUploadFileForm({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
onRefetch();
|
handleRefetch();
|
||||||
setIsUploaded(true);
|
setIsUploaded(true);
|
||||||
},
|
},
|
||||||
onError: () => {
|
onError: () => {
|
||||||
|
@ -12,7 +12,7 @@ export default function ImageUploadFolderForm({
|
|||||||
folderId,
|
folderId,
|
||||||
}: {
|
}: {
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onRefetch: () => void;
|
onRefetch?: () => void;
|
||||||
projectId: number;
|
projectId: number;
|
||||||
folderId: number;
|
folderId: number;
|
||||||
}) {
|
}) {
|
||||||
@ -32,6 +32,12 @@ export default function ImageUploadFolderForm({
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleRefetch = () => {
|
||||||
|
if (onRefetch) {
|
||||||
|
onRefetch();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const newFiles = event.target.files;
|
const newFiles = event.target.files;
|
||||||
|
|
||||||
@ -75,7 +81,7 @@ export default function ImageUploadFolderForm({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
onRefetch;
|
handleRefetch();
|
||||||
setIsUploaded(true);
|
setIsUploaded(true);
|
||||||
},
|
},
|
||||||
onError: () => {
|
onError: () => {
|
||||||
|
@ -12,7 +12,7 @@ export default function ImageUploadZipForm({
|
|||||||
folderId,
|
folderId,
|
||||||
}: {
|
}: {
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onRefetch: () => void;
|
onRefetch?: () => void;
|
||||||
projectId: number;
|
projectId: number;
|
||||||
folderId: number;
|
folderId: number;
|
||||||
}) {
|
}) {
|
||||||
@ -32,6 +32,12 @@ export default function ImageUploadZipForm({
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleRefetch = () => {
|
||||||
|
if (onRefetch) {
|
||||||
|
onRefetch();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const newFiles = event.target.files;
|
const newFiles = event.target.files;
|
||||||
|
|
||||||
@ -76,7 +82,7 @@ export default function ImageUploadZipForm({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
onRefetch();
|
handleRefetch();
|
||||||
setIsUploaded(true);
|
setIsUploaded(true);
|
||||||
},
|
},
|
||||||
onError: () => {
|
onError: () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user