lbry-desktop/ui/page/rewards/index.js
2019-11-11 13:27:29 -05:00

29 lines
704 B
JavaScript

import { connect } from 'react-redux';
import {
selectFetchingRewards,
selectUnclaimedRewards,
selectClaimedRewards,
selectUser,
doRewardList,
doUserFetch,
} from 'lbryinc';
import { selectDaemonSettings } from 'redux/selectors/settings';
import RewardsPage from './view';
const select = state => ({
daemonSettings: selectDaemonSettings(state),
fetching: selectFetchingRewards(state),
rewards: selectUnclaimedRewards(state),
claimed: selectClaimedRewards(state),
user: selectUser(state),
});
const perform = dispatch => ({
fetchRewards: () => dispatch(doRewardList()),
fetchUser: () => dispatch(doUserFetch()),
});
export default connect(
select,
perform
)(RewardsPage);