2019-08-27 16:43:42 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { selectCreatingChannel, selectMyChannelClaims, selectCreateChannelError } from 'redux/selectors/claims';
|
|
|
|
import { doCreateChannel } from 'redux/actions/claims';
|
2019-09-26 18:07:11 +02:00
|
|
|
import UserFirstChannel from './view';
|
2019-08-27 16:43:42 +02:00
|
|
|
|
2021-10-08 05:47:39 +02:00
|
|
|
const select = (state) => ({
|
2019-08-27 16:43:42 +02:00
|
|
|
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
|
|
|
});
|
|
|
|
|
2021-10-08 05:47:39 +02:00
|
|
|
const perform = (dispatch) => ({
|
2019-08-27 16:43:42 +02:00
|
|
|
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
|
|
|
|
});
|
|
|
|
|
2020-06-15 22:33:03 +02:00
|
|
|
export default connect(select, perform)(UserFirstChannel);
|