Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onAccept={src => {
const blob = dataURLtoBlob(src);
const errors = validateFiles([blob]);
if (errors.length) {
showSnackbar(outputFileSelectionError(errors));
} else {
blob.name = file.name;
uploadFile(blob);
}
dispatch({ type: "hideImageEditor" });
}}
/>