lbry-desktop/ui/page/notifications/index.js
infinite-persistence b1f4a2a590 Defer notification/categories
## Ticket
Part of "#385 Defer api.odysee.com calls to their respective pages / install new"

## Change
Pull out `notification/categories` from `doNotificationList` and fetch it in Notifications Page. I don't there there are other places that need it for now.
2021-12-29 09:15:06 -05:00

36 lines
1.1 KiB
JavaScript

import { connect } from 'react-redux';
import {
selectNotifications,
selectNotificationsFiltered,
selectIsFetchingNotifications,
selectUnreadNotificationCount,
selectUnseenNotificationCount,
selectNotificationCategories,
} from 'redux/selectors/notifications';
import { doCommentReactList } from 'redux/actions/comments';
import { selectActiveChannelClaim } from 'redux/selectors/app';
import {
doReadNotifications,
doNotificationList,
doSeeAllNotifications,
doNotificationCategories,
} from 'redux/actions/notifications';
import NotificationsPage from './view';
const select = (state) => ({
notifications: selectNotifications(state),
notificationsFiltered: selectNotificationsFiltered(state),
notificationCategories: selectNotificationCategories(state),
fetching: selectIsFetchingNotifications(state),
unreadCount: selectUnreadNotificationCount(state),
unseenCount: selectUnseenNotificationCount(state),
activeChannel: selectActiveChannelClaim(state),
});
export default connect(select, {
doReadNotifications,
doNotificationList,
doNotificationCategories,
doSeeAllNotifications,
doCommentReactList,
})(NotificationsPage);