import React from 'react'; import lbry from '../lbry.js'; import {CreditAmount} from '../component/common.js'; import Modal from '../component/modal.js'; import {Link} from '../component/link.js'; import lbryio from '../lbryio.js'; const RewardTile = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, title: React.PropTypes.string.isRequired, description: React.PropTypes.string.isRequired, claimed: React.PropTypes.bool.isRequired, value: React.PropTypes.number.isRequired, }, render: function() { return (

{this.props.description}
{this.props.claimed ? This reward has been claimed. : }
); } }); var RewardsPage = React.createClass({ componentWillMount: function() { lbryio.call('reward_type', 'list', {}).then((rewardTypes) => { this.setState({ rewardTypes: rewardTypes, }); }); }, getInitialState: function() { return { rewardTypes: null, }; }, render: function() { return (

Rewards

{!this.state.rewardTypes ? null : this.state.rewardTypes.map(({name, title, description, claimed, value}) => { return ; })}
); } }); export default RewardsPage;