2017-12-21 22:08:54 +01:00
|
|
|
import rewards from 'rewards';
|
|
|
|
import { connect } from 'react-redux';
|
2018-04-18 06:03:01 +02:00
|
|
|
import { doCloseModal } from 'lbry-redux';
|
2017-12-21 22:08:54 +01:00
|
|
|
import { makeSelectRewardByType } from 'redux/selectors/rewards';
|
|
|
|
import ModalFirstReward from './view';
|
2017-07-25 00:59:26 +02:00
|
|
|
|
2018-04-18 06:03:01 +02:00
|
|
|
const select = state => {
|
2017-07-25 00:59:26 +02:00
|
|
|
const selectReward = makeSelectRewardByType();
|
|
|
|
|
|
|
|
return {
|
2017-12-30 21:59:37 +01:00
|
|
|
reward: selectReward(state, { reward_type: rewards.TYPE_NEW_USER }),
|
2017-07-25 00:59:26 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
closeModal: () => dispatch(doCloseModal()),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(ModalFirstReward);
|