2020-10-13 15:26:59 -04:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2020-01-02 11:30:27 -05:00
|
|
|
import { connect } from 'react-redux';
|
2020-10-05 14:31:51 -04:00
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2020-06-15 16:33:03 -04:00
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
2020-01-02 11:30:27 -05:00
|
|
|
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
2020-11-10 11:07:00 -05:00
|
|
|
import { makeSelectClientSetting, selectHomepageData } from 'redux/selectors/settings';
|
2020-10-13 15:26:59 -04:00
|
|
|
|
2020-01-02 11:30:27 -05:00
|
|
|
import DiscoverPage from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
followedTags: selectFollowedTags(state),
|
|
|
|
subscribedChannels: selectSubscriptions(state),
|
2020-01-20 11:47:03 -05:00
|
|
|
authenticated: selectUserVerifiedEmail(state),
|
2020-10-13 15:26:59 -04:00
|
|
|
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
|
2020-11-10 11:07:00 -05:00
|
|
|
homepageData: selectHomepageData(state),
|
2020-01-02 11:30:27 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = {};
|
|
|
|
|
2020-06-15 16:33:03 -04:00
|
|
|
export default connect(select, perform)(DiscoverPage);
|