lbry-desktop/ui/page/channelNew/index.js
infinite-persistence 80d4d8c57c
Limit channel-creation count from the UI (#886)
## Issue
534 prevent new channel creation over x channels

## Notes
Also handled from the API call (`doCreateChannel`) in case there are other UI components that create channels.
2022-02-16 09:14:08 -05:00

22 lines
760 B
JavaScript

import REWARD_TYPES from 'rewards';
import { connect } from 'react-redux';
import { selectBalance } from 'redux/selectors/wallet';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import { doClaimRewardType } from 'redux/actions/rewards';
import { selectIsMyChannelCountOverLimit } from 'redux/selectors/claims';
import ChannelNew from './view';
const select = (state) => ({
balance: selectBalance(state),
isAuthenticated: selectUserVerifiedEmail(state),
channelCountOverLimit: selectIsMyChannelCountOverLimit(state),
});
export default connect(select, (dispatch) => ({
claimConfirmEmailReward: () =>
dispatch(
doClaimRewardType(REWARD_TYPES.TYPE_CONFIRM_EMAIL, {
notifyError: false,
})
),
}))(ChannelNew);