2018-03-26 23:32:43 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import SelectChannel from './view';
|
2019-04-24 16:02:08 +02:00
|
|
|
import {
|
|
|
|
selectBalance,
|
|
|
|
selectMyChannelClaims,
|
|
|
|
selectFetchingMyChannels,
|
|
|
|
doFetchChannelListMine,
|
|
|
|
doCreateChannel,
|
|
|
|
} from 'lbry-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
2018-03-26 23:32:43 +02:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
channels: selectMyChannelClaims(state),
|
|
|
|
fetchingChannels: selectFetchingMyChannels(state),
|
|
|
|
balance: selectBalance(state),
|
2019-10-28 19:53:59 +01:00
|
|
|
emailVerified: selectUserVerifiedEmail(state),
|
2018-03-26 23:32:43 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
|
|
|
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
|
|
|
});
|
|
|
|
|
2020-06-15 22:33:03 +02:00
|
|
|
export default connect(select, perform)(SelectChannel);
|