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

20 lines
754 B
JavaScript
Raw Normal View History

2020-02-26 19:39:03 +01:00
import { connect } from 'react-redux';
import { doChannelSubscribe } from 'redux/actions/subscriptions';
import { selectHomepageData, selectLanguage } from 'redux/selectors/settings';
2021-04-25 07:31:19 +02:00
import { selectPrefsReady } from 'redux/selectors/sync';
import { selectSubscriptions } from 'redux/selectors/subscriptions';
import UserChannelFollowIntro from './view';
2020-02-26 19:39:03 +01:00
2021-04-25 07:31:19 +02:00
const select = (state) => ({
homepageData: selectHomepageData(state),
language: selectLanguage(state),
2021-04-25 07:31:19 +02:00
prefsReady: selectPrefsReady(state),
subscribedChannels: selectSubscriptions(state),
2020-02-26 19:39:03 +01:00
});
2021-04-25 07:31:19 +02:00
const perform = (dispatch) => ({
channelSubscribe: (channelName, uri) => dispatch(doChannelSubscribe({ channelName, uri })),
});
export default connect(select, perform)(UserChannelFollowIntro);