lbry-desktop/ui/page/channels/index.js
infinite-persistence f4d327f1f4 Set 'activeChannel' before entering Dashboard
## Issue
6237: Analytics button from Channels page doesn't open analytics to right channel
2021-06-22 18:32:05 -04:00

25 lines
779 B
JavaScript

import { connect } from 'react-redux';
import {
selectMyChannelClaims,
selectMyChannelUrls,
doFetchChannelListMine,
selectFetchingMyChannels,
} from 'lbry-redux';
import { doSetActiveChannel } from 'redux/actions/app';
import { selectYoutubeChannels } from 'redux/selectors/user';
import ChannelsPage from './view';
const select = (state) => ({
channelUrls: selectMyChannelUrls(state),
channels: selectMyChannelClaims(state),
fetchingChannels: selectFetchingMyChannels(state),
youtubeChannels: selectYoutubeChannels(state),
});
const perform = (dispatch) => ({
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
doSetActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
});
export default connect(select, perform)(ChannelsPage);