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

35 lines
1.5 KiB
JavaScript
Raw Normal View History

2018-03-26 23:32:43 +02:00
import { connect } from 'react-redux';
import { doFetchLastActiveSubs } from 'redux/actions/subscriptions';
import { selectLastActiveSubscriptions, selectSubscriptions } from 'redux/selectors/subscriptions';
import { doClearClaimSearch } from 'redux/actions/claims';
import { doClearPurchasedUriSuccess } from 'redux/actions/file';
import { selectFollowedTags } from 'redux/selectors/tags';
import { selectUserVerifiedEmail, selectUser, selectOdyseeMembershipName } from 'redux/selectors/user';
import { selectHomepageData, selectWildWestDisabled } from 'redux/selectors/settings';
2019-12-18 06:27:08 +01:00
import { doSignOut } from 'redux/actions/app';
import { selectUnseenNotificationCount } from 'redux/selectors/notifications';
import { selectPurchaseUriSuccess, selectOdyseeMembershipForUri } from 'redux/selectors/claims';
2020-08-10 22:47:39 +02:00
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),
lastActiveSubs: selectLastActiveSubscriptions(state),
followedTags: selectFollowedTags(state),
2019-12-18 06:27:08 +01:00
email: selectUserVerifiedEmail(state),
2020-05-21 17:38:28 +02:00
purchaseSuccess: selectPurchaseUriSuccess(state),
unseenCount: selectUnseenNotificationCount(state),
2020-08-11 22:32:03 +02:00
user: selectUser(state),
homepageData: selectHomepageData(state),
2022-02-15 18:36:33 +01:00
wildWestDisabled: selectWildWestDisabled(state),
odyseeMembership: selectOdyseeMembershipName(state),
odyseeMembershipByUri: (uri) => selectOdyseeMembershipForUri(state, uri),
2018-03-26 23:32:43 +02:00
});
2020-05-21 17:38:28 +02:00
export default connect(select, {
doClearClaimSearch,
2020-05-21 17:38:28 +02:00
doSignOut,
doClearPurchasedUriSuccess,
doFetchLastActiveSubs,
2020-05-21 17:38:28 +02:00
})(SideNavigation);