Created
April 4, 2020 19:56
-
-
Save jimjeffers/5e1725e0725a7b5a7d96a1dea3cb03cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handleCompletedUploaded: HandleFileUploadFn = useCallback(async preview => { | |
const normalizedPreviews = mergePreviewsToState([{ ...preview, status: FileUploadStatus.Available }], localPreviews) | |
setLocalPreviews(normalizedPreviews) | |
await savePreviews(normalizedPreviews) | |
}, [mergePreviewsToState, localPreviews, setLocalPreviews]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment