2018-03-26 23:32:43 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import SelectChannel from './view';
|
2018-04-18 06:03:01 +02:00
|
|
|
import { selectBalance, selectMyChannelClaims, selectFetchingMyChannels } from 'lbry-redux';
|
2018-03-26 23:32:43 +02:00
|
|
|
import { doFetchChannelListMine, doCreateChannel } from 'redux/actions/content';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
channels: selectMyChannelClaims(state),
|
|
|
|
fetchingChannels: selectFetchingMyChannels(state),
|
|
|
|
balance: selectBalance(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
|
|
|
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(SelectChannel);
|