mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-27 19:29:57 +03:00
better handling for multiple separate uploads
This commit is contained in:
parent
afaf30870e
commit
f972e1e535
@ -124,6 +124,11 @@ export default class ApplicationPage extends React.Component {
|
||||
};
|
||||
|
||||
_handleRegisterFileLoading = ({ fileLoading }) => {
|
||||
if (this.state.fileLoading) {
|
||||
return this.setState({
|
||||
fileLoading: { ...this.state.fileLoading, ...fileLoading },
|
||||
});
|
||||
}
|
||||
return this.setState({
|
||||
fileLoading,
|
||||
});
|
||||
|
@ -95,7 +95,7 @@ export default class SidebarAddFileToBucket extends React.Component {
|
||||
|
||||
if (!files.length) {
|
||||
alert("We could not find any files to upload.");
|
||||
return this.props.onRegisterFileLoading({ fileLoading: null });
|
||||
// return this.props.onRegisterFileLoading({ fileLoading: null });
|
||||
}
|
||||
|
||||
this.props.onRegisterFileLoading({ fileLoading });
|
||||
@ -146,7 +146,6 @@ export default class SidebarAddFileToBucket extends React.Component {
|
||||
return total + curr.total;
|
||||
}, 0);
|
||||
}
|
||||
console.log(this.props.fileLoading);
|
||||
return (
|
||||
<React.Fragment>
|
||||
<System.P
|
||||
|
Loading…
Reference in New Issue
Block a user