lbry-desktop/src/renderer/modal/modalFirstReward/index.js

20 lines
529 B
JavaScript
Raw Normal View History

import rewards from 'rewards';
import { connect } from 'react-redux';
2018-04-18 06:03:01 +02:00
import { doCloseModal } from 'lbry-redux';
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 {
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);