diff --git a/js/component/link.js b/js/component/link.js index 7d08cc173..bc3d12733 100644 --- a/js/component/link.js +++ b/js/component/link.js @@ -152,11 +152,15 @@ var WatchLink = React.createClass({ hidden: React.PropTypes.bool, }, handleClick: function() { + this.setState({ + loading: true, + }) lbry.getCostEstimate(this.props.streamName, (amount) => { lbry.getBalance((balance) => { if (amount > balance) { this.setState({ modal: 'notEnoughCredits', + loading: false, }); } else { window.location = '?watch=' + this.props.streamName; @@ -167,6 +171,7 @@ var WatchLink = React.createClass({ getInitialState: function() { return { modal: null, + loading: false, }; }, closeModal: function() { @@ -184,7 +189,8 @@ var WatchLink = React.createClass({ return ( + disabled={this.state.loading} label={this.props.label} icon={this.props.icon} + onClick={this.handleClick} /> You don't have enough LBRY credits to pay for this stream.