lbry-desktop/ui/component/userFirstChannel/index.js

22 lines
675 B
JavaScript
Raw Normal View History

2019-08-27 16:43:42 +02:00
import { connect } from 'react-redux';
2019-09-26 18:07:11 +02:00
import { selectUser, selectEmailToVerify } from 'lbryinc';
import { doCreateChannel, selectCreatingChannel, selectMyChannelClaims, selectCreateChannelError } from 'lbry-redux';
import UserFirstChannel from './view';
2019-08-27 16:43:42 +02:00
const select = state => ({
email: selectEmailToVerify(state),
user: selectUser(state),
channels: selectMyChannelClaims(state),
2019-09-26 18:07:11 +02:00
creatingChannel: selectCreatingChannel(state),
createChannelError: selectCreateChannelError(state),
2019-08-27 16:43:42 +02:00
});
const perform = dispatch => ({
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
});
export default connect(
select,
perform
2019-09-26 18:07:11 +02:00
)(UserFirstChannel);