8eff3dca21
- No need to generate the full claim since we are only using the ID.
17 lines
634 B
JavaScript
17 lines
634 B
JavaScript
import { connect } from 'react-redux';
|
|
import SelectChannel from './view';
|
|
import { selectMyChannelClaims, selectFetchingMyChannels } from 'redux/selectors/claims';
|
|
import { selectActiveChannelId } from 'redux/selectors/app';
|
|
import { doSetActiveChannel } from 'redux/actions/app';
|
|
|
|
const select = (state) => ({
|
|
myChannelClaims: selectMyChannelClaims(state),
|
|
fetchingChannels: selectFetchingMyChannels(state),
|
|
activeChannelId: selectActiveChannelId(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
setActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
|
|
});
|
|
|
|
export default connect(select, perform)(SelectChannel);
|