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

22 lines
886 B
JavaScript
Raw Normal View History

2019-08-27 16:43:42 +02:00
import { connect } from 'react-redux';
import { selectUser, selectEmailToVerify } from 'redux/selectors/user';
import { selectCreatingChannel, selectMyChannelClaims, selectCreateChannelError } from 'redux/selectors/claims';
import { doCreateChannel } from 'redux/actions/claims';
2022-05-02 08:04:20 +02:00
import { doOpenModal } from 'redux/actions/app';
2019-09-26 18:07:11 +02:00
import UserFirstChannel from './view';
2019-08-27 16:43:42 +02:00
const select = (state) => ({
2019-08-27 16:43:42 +02:00
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) => ({
2022-05-02 08:04:20 +02:00
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
2022-05-02 09:48:28 +02:00
createChannel: (name, amount, optionalParams) => dispatch(doCreateChannel(name, amount, optionalParams)),
2019-08-27 16:43:42 +02:00
});
export default connect(select, perform)(UserFirstChannel);