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

18 lines
601 B
JavaScript
Raw Normal View History

2018-03-26 23:32:43 +02:00
import { connect } from 'react-redux';
import SelectChannel from './view';
import { selectMyChannelClaims, selectFetchingMyChannels } from 'redux/selectors/claims';
import { selectActiveChannelClaimId } from 'redux/selectors/app';
import { doSetActiveChannel } from 'redux/actions/app';
2018-03-26 23:32:43 +02:00
const select = (state) => ({
myChannelClaims: selectMyChannelClaims(state),
2018-03-26 23:32:43 +02:00
fetchingChannels: selectFetchingMyChannels(state),
activeChannelClaimId: selectActiveChannelClaimId(state),
2018-03-26 23:32:43 +02:00
});
const perform = {
setActiveChannel: doSetActiveChannel,
};
2018-03-26 23:32:43 +02:00
export default connect(select, perform)(SelectChannel);