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

18 lines
621 B
JavaScript
Raw Normal View History

2020-03-18 18:11:37 +01:00
import { connect } from 'react-redux';
2021-06-09 13:07:37 +02:00
import { selectMyChannelClaims, makeSelectClaimForUri } from 'lbry-redux';
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
import { doSetActiveChannel, doSetIncognito } from 'redux/actions/app';
import SelectChannel from './view';
2020-03-18 18:11:37 +01:00
2021-06-09 13:07:37 +02:00
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
2020-03-18 18:11:37 +01:00
channels: selectMyChannelClaims(state),
activeChannelClaim: selectActiveChannelClaim(state),
incognito: selectIncognito(state),
2020-03-18 18:11:37 +01:00
});
export default connect(select, {
doSetActiveChannel,
doSetIncognito,
})(SelectChannel);