2018-03-26 23:32:43 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-06-11 20:10:58 +02:00
|
|
|
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
2020-10-05 20:31:51 +02:00
|
|
|
import { selectPurchaseUriSuccess, doClearPurchasedUriSuccess, SETTINGS } from 'lbry-redux';
|
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2020-08-11 22:32:03 +02:00
|
|
|
import { selectUserVerifiedEmail, selectUser } from 'redux/selectors/user';
|
2020-11-10 17:07:00 +01:00
|
|
|
import { makeSelectClientSetting, selectHomepageData } from 'redux/selectors/settings';
|
2019-12-18 06:27:08 +01:00
|
|
|
import { doSignOut } from 'redux/actions/app';
|
2020-08-10 22:47:39 +02:00
|
|
|
import { selectUnreadNotificationCount } from 'redux/selectors/notifications';
|
|
|
|
|
2019-12-18 06:27:08 +01:00
|
|
|
import SideNavigation from './view';
|
2018-03-26 23:32:43 +02:00
|
|
|
|
|
|
|
const select = state => ({
|
2019-06-11 20:10:58 +02:00
|
|
|
subscriptions: selectSubscriptions(state),
|
2020-09-02 04:38:40 +02:00
|
|
|
followedTags: selectFollowedTags(state),
|
2019-06-12 23:51:39 +02:00
|
|
|
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state), // trigger redraw on language change
|
2019-12-18 06:27:08 +01:00
|
|
|
email: selectUserVerifiedEmail(state),
|
2020-05-21 17:38:28 +02:00
|
|
|
purchaseSuccess: selectPurchaseUriSuccess(state),
|
2020-08-10 22:47:39 +02:00
|
|
|
unreadCount: selectUnreadNotificationCount(state),
|
2020-08-11 22:32:03 +02:00
|
|
|
user: selectUser(state),
|
2020-11-10 17:07:00 +01:00
|
|
|
homepageData: selectHomepageData(state),
|
2018-03-26 23:32:43 +02:00
|
|
|
});
|
|
|
|
|
2020-05-21 17:38:28 +02:00
|
|
|
export default connect(select, {
|
|
|
|
doSignOut,
|
|
|
|
doClearPurchasedUriSuccess,
|
|
|
|
})(SideNavigation);
|