In DownloadLink, don't check this.state.downloading on click

If this.state.downloading is true, the button will be disabled anyway.
This commit is contained in:
Alex Liebowitz 2016-11-23 23:19:06 -05:00
parent 468692b480
commit 12afb10cbc

View file

@ -103,7 +103,6 @@ var DownloadLink = React.createClass({
}) })
}, },
handleClick: function() { handleClick: function() {
if (!this.state.downloading) { //@TODO: Continually update this.state.downloading based on actual status of file
this.setState({ this.setState({
downloading: true downloading: true
}); });
@ -125,7 +124,6 @@ var DownloadLink = React.createClass({
} }
}); });
}); });
}
}, },
render: function() { render: function() {
var label = (!this.state.downloading ? this.props.label : this.props.downloadingLabel); var label = (!this.state.downloading ? this.props.label : this.props.downloadingLabel);