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