2019-06-17 22:32:38 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { selectUnclaimedRewardValue, selectFetchingRewards, selectClaimedRewards } from 'redux/selectors/rewards';
|
|
|
|
import { doRewardList } from 'redux/actions/rewards';
|
2019-06-17 22:32:38 +02:00
|
|
|
import RewardSummary from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
|
|
|
|
fetching: selectFetchingRewards(state),
|
|
|
|
rewards: selectClaimedRewards(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
fetchRewards: () => dispatch(doRewardList()),
|
|
|
|
});
|
|
|
|
|
2020-06-15 22:33:03 +02:00
|
|
|
export default connect(select, perform)(RewardSummary);
|