remove onDrop toast

This commit is contained in:
nklhrstv 2022-10-19 14:57:14 +03:00
parent 3c28f671c5
commit 4cec766e7e
2 changed files with 0 additions and 14 deletions

View file

@ -37,14 +37,6 @@ const ServicesToaster = () => {
}
}
};
const onDrop = (file) => {
toast.show({
type: 'alert',
title: 'Processing file',
message: file.name,
timeout: 4000
});
};
const onDragAndDropError = (error) => {
toast.show({
type: 'error',
@ -54,11 +46,9 @@ const ServicesToaster = () => {
});
};
core.transport.on('CoreEvent', onCoreEvent);
dragAndDrop.on('drop', onDrop);
dragAndDrop.on('error', onDragAndDropError);
return () => {
core.transport.off('CoreEvent', onCoreEvent);
dragAndDrop.off('drop', onDrop);
dragAndDrop.off('error', onDragAndDropError);
};
}, []);

View file

@ -16,10 +16,6 @@ function DragAndDrop({ core }) {
const file = event.dataTransfer.files[0];
switch (file.type) {
case 'application/x-bittorrent': {
events.emit('drop', {
name: file.name,
type: file.type
});
try {
const torrent = await file.arrayBuffer();
core.transport.dispatch({