(file: File)
| 19 | const dragCounter = useRef(0); |
| 20 | |
| 21 | const isValidFile = (file: File) => { |
| 22 | return ( |
| 23 | file.type.startsWith('image/') || |
| 24 | file.type === 'application/zip' || |
| 25 | file.type === 'application/x-zip-compressed' || |
| 26 | file.name.endsWith('.zip') || |
| 27 | file.name.endsWith('.svg') |
| 28 | ); |
| 29 | }; |
| 30 | |
| 31 | useEffect(() => { |
| 32 | const handleWindowDragEnter = (e: DragEvent) => { |