Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwagerfield committed Sep 18, 2023
1 parent 94ffee0 commit 82b81b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ const MyDropzoneComponent = () => (
options={options} // Required.
width="600px" // Optional.
height="375px" // Optional.
onUpdate={files => {
onUpdate={({ uploadedFiles }) => {
// Optional.
if (files.length === 0) {
if (uploadedFiles.length === 0) {
console.log("No files selected.");
} else {
console.log("Files uploaded:");
console.log(files.map(f => f.fileUrl));
console.log(uploadedFiles.map(f => f.fileUrl));
}
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const options = {

const MyApp = () => (
<UploadDropzone options={options}
onUpdate={files => alert(files.map(x => x.fileUrl).join("\n"))}
onUpdate={({ uploadedFiles }) => alert(uploadedFiles.map(x => x.fileUrl).join("\n"))}
width="600px"
height="375px" />
);
Expand Down

0 comments on commit 82b81b5

Please sign in to comment.