2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-07-18 01:26:03 +02:00
|
|
|
import { selectUnclaimedRewardValue, selectFetchingRewards } from 'redux/selectors/rewards';
|
|
|
|
import { doRewardList } from 'redux/actions/rewards';
|
2018-08-28 22:46:50 +02:00
|
|
|
import { doFetchRewardedContent } from 'redux/actions/content';
|
2017-12-21 22:08:54 +01:00
|
|
|
import RewardSummary from './view';
|
2017-08-20 23:42:00 +02:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
|
2018-07-18 01:26:03 +02:00
|
|
|
fetching: selectFetchingRewards(state),
|
2017-08-20 23:42:00 +02:00
|
|
|
});
|
|
|
|
|
2018-07-18 01:26:03 +02:00
|
|
|
const perform = dispatch => ({
|
|
|
|
fetchRewards: () => dispatch(doRewardList()),
|
2018-08-28 22:46:50 +02:00
|
|
|
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
|
2018-07-18 01:26:03 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(RewardSummary);
|