Restores file import on sidebar menu

This commit is contained in:
Tom Moor committed 2018-01-29 23:04:45 -08:00
1 parent ba72ecb0e3
commit 29aba6bfe6
3 files changed
+27 -15

No files matched your search

+12 -4
View File
@@ -54,11 +54,19 @@ class DropToImport extends Component {
}
for (const file of files) {
await importFile({ file, documentId, collectionId, redirect }, doc => {
if (redirect) {
this.props.history.push(doc.url);
importFile(
{
documents: this.props.documents,
file,
documentId,
collectionId,
},
doc => {
if (redirect) {
this.props.history.push(doc.url);
}
}
});
);
}
} catch (err) {
// TODO: show error alert.