2021-04-03 02:21:54 -04:00
|
|
|
import REWARD_TYPES from 'rewards';
|
2020-06-29 15:54:07 -04:00
|
|
|
import { connect } from 'react-redux';
|
2020-08-25 15:54:06 -04:00
|
|
|
import { selectBalance } from 'lbry-redux';
|
2021-04-03 02:21:54 -04:00
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
|
|
import { doClaimRewardType } from 'redux/actions/rewards';
|
2020-06-29 15:54:07 -04:00
|
|
|
import ChannelNew from './view';
|
|
|
|
|
2021-03-03 13:50:16 -05:00
|
|
|
const select = (state) => ({
|
2020-08-25 15:54:06 -04:00
|
|
|
balance: selectBalance(state),
|
2021-04-03 02:21:54 -04:00
|
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
2020-08-25 15:54:06 -04:00
|
|
|
});
|
2020-06-29 15:54:07 -04:00
|
|
|
|
2021-04-03 02:21:54 -04:00
|
|
|
export default connect(select, (dispatch) => ({
|
|
|
|
claimConfirmEmailReward: () =>
|
|
|
|
dispatch(
|
|
|
|
doClaimRewardType(REWARD_TYPES.TYPE_CONFIRM_EMAIL, {
|
|
|
|
notifyError: false,
|
|
|
|
})
|
|
|
|
),
|
|
|
|
}))(ChannelNew);
|