2018-03-26 14:32:43 -07:00
|
|
|
import { connect } from 'react-redux';
|
2022-03-04 15:15:23 +08:00
|
|
|
import { doFetchLastActiveSubs } from 'redux/actions/subscriptions';
|
|
|
|
import { selectLastActiveSubscriptions, selectSubscriptions } from 'redux/selectors/subscriptions';
|
2022-02-21 04:54:23 -08:00
|
|
|
import { doClearClaimSearch } from 'redux/actions/claims';
|
2021-10-17 16:36:14 +08:00
|
|
|
import { doClearPurchasedUriSuccess } from 'redux/actions/file';
|
2020-10-05 14:31:51 -04:00
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2022-03-09 19:05:37 +01:00
|
|
|
import { selectUserVerifiedEmail, selectUser, selectOdyseeMembershipName } from 'redux/selectors/user';
|
2022-04-19 15:12:54 +08:00
|
|
|
import { selectHomepageData } from 'redux/selectors/settings';
|
2019-12-18 00:27:08 -05:00
|
|
|
import { doSignOut } from 'redux/actions/app';
|
2021-03-16 09:42:49 +08:00
|
|
|
import { selectUnseenNotificationCount } from 'redux/selectors/notifications';
|
2022-03-09 19:05:37 +01:00
|
|
|
import { selectPurchaseUriSuccess, selectOdyseeMembershipForUri } from 'redux/selectors/claims';
|
2020-08-10 16:47:39 -04:00
|
|
|
|
2019-12-18 00:27:08 -05:00
|
|
|
import SideNavigation from './view';
|
2018-03-26 14:32:43 -07:00
|
|
|
|
2021-03-16 09:42:49 +08:00
|
|
|
const select = (state) => ({
|
2019-06-11 14:10:58 -04:00
|
|
|
subscriptions: selectSubscriptions(state),
|
2022-03-04 15:15:23 +08:00
|
|
|
lastActiveSubs: selectLastActiveSubscriptions(state),
|
2020-09-02 10:38:40 +08:00
|
|
|
followedTags: selectFollowedTags(state),
|
2019-12-18 00:27:08 -05:00
|
|
|
email: selectUserVerifiedEmail(state),
|
2020-05-21 11:38:28 -04:00
|
|
|
purchaseSuccess: selectPurchaseUriSuccess(state),
|
2021-03-16 09:42:49 +08:00
|
|
|
unseenCount: selectUnseenNotificationCount(state),
|
2020-08-11 16:32:03 -04:00
|
|
|
user: selectUser(state),
|
2020-11-10 11:07:00 -05:00
|
|
|
homepageData: selectHomepageData(state),
|
2022-03-09 19:05:37 +01:00
|
|
|
odyseeMembership: selectOdyseeMembershipName(state),
|
|
|
|
odyseeMembershipByUri: (uri) => selectOdyseeMembershipForUri(state, uri),
|
2018-03-26 14:32:43 -07:00
|
|
|
});
|
|
|
|
|
2020-05-21 11:38:28 -04:00
|
|
|
export default connect(select, {
|
2022-02-21 04:54:23 -08:00
|
|
|
doClearClaimSearch,
|
2020-05-21 11:38:28 -04:00
|
|
|
doSignOut,
|
|
|
|
doClearPurchasedUriSuccess,
|
2022-03-04 15:15:23 +08:00
|
|
|
doFetchLastActiveSubs,
|
2020-05-21 11:38:28 -04:00
|
|
|
})(SideNavigation);
|