2019-11-30 20:39:51 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ChannelCreate from './view';
|
2020-04-23 22:38:09 +02:00
|
|
|
import { selectBalance, doCreateChannel, selectCreatingChannel, selectCreateChannelError } from 'lbry-redux';
|
2019-11-30 20:39:51 +01:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
balance: selectBalance(state),
|
2020-04-23 22:38:09 +02:00
|
|
|
creatingChannel: selectCreatingChannel(state),
|
|
|
|
createChannelError: selectCreateChannelError(state),
|
2019-11-30 20:39:51 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
|
|
|
|
});
|
|
|
|
|
2020-04-23 22:38:09 +02:00
|
|
|
export default connect(select, perform)(ChannelCreate);
|