2020-02-26 19:39:03 +01:00
|
|
|
import { connect } from 'react-redux';
|
2020-03-12 02:43:52 +01:00
|
|
|
import { doChannelSubscribe } from 'redux/actions/subscriptions';
|
2021-12-20 21:35:59 +01:00
|
|
|
import { selectHomepageData, selectLanguage } from 'redux/selectors/settings';
|
2021-04-25 07:31:19 +02:00
|
|
|
import { selectPrefsReady } from 'redux/selectors/sync';
|
2021-12-20 21:35:59 +01:00
|
|
|
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) => ({
|
2020-11-10 17:07:00 +01:00
|
|
|
homepageData: selectHomepageData(state),
|
2021-12-20 21:35:59 +01:00
|
|
|
language: selectLanguage(state),
|
2021-04-25 07:31:19 +02:00
|
|
|
prefsReady: selectPrefsReady(state),
|
2021-12-20 21:35:59 +01:00
|
|
|
subscribedChannels: selectSubscriptions(state),
|
2020-02-26 19:39:03 +01:00
|
|
|
});
|
|
|
|
|
2021-04-25 07:31:19 +02:00
|
|
|
const perform = (dispatch) => ({
|
2021-12-20 21:35:59 +01:00
|
|
|
channelSubscribe: (channelName, uri) => dispatch(doChannelSubscribe({ channelName, uri })),
|
2020-03-12 02:43:52 +01:00
|
|
|
});
|
|
|
|
|
2020-10-05 20:31:51 +02:00
|
|
|
export default connect(select, perform)(UserChannelFollowIntro);
|