diff --git a/js/page/show.js b/js/page/show.js index 9f8654c0b..048281ad0 100644 --- a/js/page/show.js +++ b/js/page/show.js @@ -12,6 +12,7 @@ var FormatItem = React.createClass({ claimInfo: React.PropTypes.object, amount: React.PropTypes.number, name: React.PropTypes.string, + available: React.PropTypes.string, }, render: function() { @@ -24,6 +25,7 @@ var FormatItem = React.createClass({ var license = claimInfo.license; var fileContentType = claimInfo['content-type']; + var available = this.props.available; var amount = this.props.amount || 0.0; return ( @@ -39,7 +41,7 @@ var FormatItem = React.createClass({ Content-Type{fileContentType} - Cost + Cost Author{author} @@ -65,6 +67,7 @@ var FormatsSection = React.createClass({ claimInfo: React.PropTypes.object, amount: React.PropTypes.number, name: React.PropTypes.string, + available: React.PropTypes.string, }, render: function() { var name = this.props.name; @@ -86,7 +89,7 @@ var FormatsSection = React.createClass({ {/* In future, anticipate multiple formats, just a guess at what it could look like // var formats = this.props.claimInfo.formats // return ({formats.map(function(format,i){ */} - + {/* })}); */} ); } @@ -109,7 +112,8 @@ var DetailPage = React.createClass({ lbry.search(this.props.name, (results) => { var result = results[0]; this.setState({ - amount: result.amount, + amount: result.cost, + available: result.available, claimInfo: result.value, searching: false, }); @@ -122,13 +126,14 @@ var DetailPage = React.createClass({ } var name = this.props.name; + var available = this.state.available; var claimInfo = this.state.claimInfo; var amount = this.state.amount; return (
- +
); }