fix: address json drag behavior

This commit is contained in:
Sheen Capadngan
2024-05-24 17:42:38 +08:00
parent 0bc778b9bf
commit c9b234dbea
@@ -152,7 +152,7 @@ export const SecretDropzone = ({
e.dataTransfer.dropEffect = "copy"; e.dataTransfer.dropEffect = "copy";
setDragActive.off(); setDragActive.off();
parseFile(e.dataTransfer.files[0]); parseFile(e.dataTransfer.files[0], e.dataTransfer.files[0].type === "application/json");
}; };
const handleFileUpload = (e: ChangeEvent<HTMLInputElement>) => { const handleFileUpload = (e: ChangeEvent<HTMLInputElement>) => {