lbry-desktop/ui/page/notifications/index.js

31 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-07-23 10:22:57 -04:00
import { connect } from 'react-redux';
import {
selectNotifications,
selectNotificationsFiltered,
2020-07-23 10:22:57 -04:00
selectIsFetchingNotifications,
selectUnreadNotificationCount,
2020-08-21 15:44:54 -04:00
selectUnseenNotificationCount,
selectNotificationCategories,
2020-07-23 10:22:57 -04:00
} from 'redux/selectors/notifications';
2021-08-27 07:29:58 -03:00
import { doCommentReactList } from 'redux/actions/comments';
import { selectActiveChannelClaim } from 'redux/selectors/app';
2020-08-21 15:44:54 -04:00
import { doReadNotifications, doNotificationList, doSeeAllNotifications } from 'redux/actions/notifications';
2020-07-23 10:22:57 -04:00
import NotificationsPage from './view';
const select = (state) => ({
2020-07-23 10:22:57 -04:00
notifications: selectNotifications(state),
notificationsFiltered: selectNotificationsFiltered(state),
notificationCategories: selectNotificationCategories(state),
2020-07-23 10:22:57 -04:00
fetching: selectIsFetchingNotifications(state),
unreadCount: selectUnreadNotificationCount(state),
2020-08-21 15:44:54 -04:00
unseenCount: selectUnseenNotificationCount(state),
2021-08-27 07:29:58 -03:00
activeChannel: selectActiveChannelClaim(state),
2020-07-23 10:22:57 -04:00
});
2020-08-10 16:47:39 -04:00
export default connect(select, {
doReadNotifications,
2020-08-21 15:44:54 -04:00
doNotificationList,
doSeeAllNotifications,
2021-08-27 07:29:58 -03:00
doCommentReactList,
2020-08-10 16:47:39 -04:00
})(NotificationsPage);