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

28 lines
721 B
JavaScript
Raw Normal View History

2018-03-26 14:32:43 -07:00
import { connect } from 'react-redux';
import SelectChannel from './view';
2019-04-24 10:02:08 -04:00
import {
selectBalance,
selectMyChannelClaims,
selectFetchingMyChannels,
doFetchChannelListMine,
doCreateChannel,
} from 'lbry-redux';
2019-10-28 14:53:59 -04:00
import { selectUserVerifiedEmail } from 'lbryinc';
2018-03-26 14:32:43 -07:00
const select = state => ({
channels: selectMyChannelClaims(state),
fetchingChannels: selectFetchingMyChannels(state),
balance: selectBalance(state),
2019-10-28 14:53:59 -04:00
emailVerified: selectUserVerifiedEmail(state),
2018-03-26 14:32:43 -07:00
});
const perform = dispatch => ({
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
});
2019-03-04 23:46:57 -05:00
export default connect(
select,
perform
)(SelectChannel);