remove drop file overlay on all drop events
This commit is contained in:
parent
b82f14bf98
commit
3aef94a525
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue