lbry-desktop/ui/js/page/rewards/index.js

26 lines
790 B
JavaScript
Raw Normal View History

2017-06-07 20:56:52 -04:00
import React from "react";
import { connect } from "react-redux";
import { doNavigate } from "actions/app";
2017-06-08 17:15:34 -04:00
import { selectFetchingRewards, selectRewards } from "selectors/rewards";
2017-06-02 19:09:52 -04:00
import {
2017-06-07 20:56:52 -04:00
selectUserIsRewardEligible,
selectUserHasEmail,
selectUserIsVerificationCandidate,
} from "selectors/user";
2017-06-23 12:29:40 +07:00
import { doRewardList } from "actions/rewards";
2017-06-07 20:56:52 -04:00
import RewardsPage from "./view";
2017-05-26 12:53:32 +04:00
2017-06-07 20:56:52 -04:00
const select = state => ({
2017-05-26 12:53:32 +04:00
fetching: selectFetchingRewards(state),
rewards: selectRewards(state),
2017-06-07 20:56:52 -04:00
hasEmail: selectUserHasEmail(state),
isEligible: selectUserIsRewardEligible(state),
isVerificationCandidate: selectUserIsVerificationCandidate(state),
});
2017-05-26 12:53:32 +04:00
2017-06-23 12:29:40 +07:00
const perform = dispatch => ({
fetchRewards: () => dispatch(doRewardList()),
});
export default connect(select, perform)(RewardsPage);