2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2019-10-14 22:18:16 +02:00
|
|
|
import {
|
|
|
|
selectFetchingRewards,
|
|
|
|
selectUnclaimedRewards,
|
|
|
|
selectClaimedRewards,
|
|
|
|
selectUser,
|
|
|
|
doRewardList,
|
|
|
|
doUserFetch,
|
|
|
|
} from 'lbryinc';
|
2018-03-16 21:55:56 +01:00
|
|
|
import { selectDaemonSettings } from 'redux/selectors/settings';
|
2017-12-21 22:08:54 +01:00
|
|
|
import RewardsPage from './view';
|
2017-05-26 10:53:32 +02:00
|
|
|
|
2018-07-11 04:54:50 +02:00
|
|
|
const select = state => ({
|
2018-03-16 21:55:56 +01:00
|
|
|
daemonSettings: selectDaemonSettings(state),
|
2017-12-13 22:36:30 +01:00
|
|
|
fetching: selectFetchingRewards(state),
|
|
|
|
rewards: selectUnclaimedRewards(state),
|
2018-07-11 04:54:50 +02:00
|
|
|
claimed: selectClaimedRewards(state),
|
2017-12-13 22:36:30 +01:00
|
|
|
user: selectUser(state),
|
|
|
|
});
|
2017-05-26 10:53:32 +02:00
|
|
|
|
2017-06-23 07:29:40 +02:00
|
|
|
const perform = dispatch => ({
|
|
|
|
fetchRewards: () => dispatch(doRewardList()),
|
2019-10-14 22:18:16 +02:00
|
|
|
fetchUser: () => dispatch(doUserFetch()),
|
2017-06-23 07:29:40 +02:00
|
|
|
});
|
|
|
|
|
2018-07-11 04:54:50 +02:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(RewardsPage);
|