remove drop file overlay on all drop events

This commit is contained in:
Abhinav-grd 2021-03-14 14:11:28 +05:30
parent b82f14bf98
commit 3aef94a525

View file

@ -214,12 +214,17 @@ export default function App({ Component, pageProps, err }) {
const onDropAccepted = useCallback(() => {
showUploadModal();
setIsDragActive(false);
}, []);
const onDrop = useCallback(() => {
setIsDragActive(false);
//to do add a banner error for when no files accepted
}, []);
const { getRootProps, getInputProps, open, acceptedFiles } = useDropzone({
noClick: true,
noKeyboard: true,
onDropAccepted,
onDrop,
accept: 'image/*, video/*, application/json, ',
});
const [isDragActive, setIsDragActive] = useState(false);