Skip to content

Commit

Permalink
feat: multi image uploader 컴포넌트가 이미지를 여러장 올릴 수 있도록 수정 (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-dong-su authored Mar 7, 2024
1 parent 237553d commit ad9a76b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/web/src/components/Image/MultiImageUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ export default function MultiImageUploader<T extends FieldValues>({
control,
});

const { handleFileUploadClick, isPending } = useFileUpload((files) => {
onChange([...value, ...files]);
});
const { handleFileUploadClick, isPending } = useFileUpload(
(files) => {
onChange([...value, ...files]);
},
{ multiple: true }
);

const handleDeleteClick = useCallback(
(imageUrl: string) => onChange(value.filter((v: string) => v !== imageUrl)),
Expand Down

0 comments on commit ad9a76b

Please sign in to comment.