Skip to content

Instantly share code, notes, and snippets.

@jimjeffers
Created April 4, 2020 19:30
Show Gist options
  • Save jimjeffers/83bae78229a821300ba634b073512f24 to your computer and use it in GitHub Desktop.
Save jimjeffers/83bae78229a821300ba634b073512f24 to your computer and use it in GitHub Desktop.
const [localPreviews, setLocalPreviews] = useState({} as INormalizedPreviews)
const handleCompletedUploaded: HandleFileUploadFn = async preview => {
const normalizedPreviews = mergePreviewsToState([{ ...preview, status: FileUploadStatus.Available }], localPreviews)
setLocalPreviews(normalizedPreviews)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment