import React from 'react'; import lbry from '../lbry.js'; import Modal from '../component/modal.js'; import {Link} from '../component/link.js'; // Placeholder for something like api.lbry.io/reward_type/list */ function apiRewardTypeList() { return [ { name: 'link_github', title: 'Link your GitHub account', description: 'Link LBRY to your GitHub account', value: 50, claimed: false, }, ]; } var RewardTile = React.createClass({ propTypes: { name: React.PropTypes.string, title: React.PropTypes.string, }, render: function() { return (

{this.props.description}
{this.props.claimed ? This reward has been claimed. : }
); } }); var RewardsPage = React.createClass({ componentWillMount: function() { this.setState({ rewardTypes: apiRewardTypeList(), }); }, 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;