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

23 lines
720 B
JavaScript
Raw Permalink Normal View History

2020-07-23 16:22:57 +02:00
import { connect } from 'react-redux';
import {
selectNotifications,
selectIsFetchingNotifications,
selectUnreadNotificationCount,
2020-08-21 21:44:54 +02:00
selectUnseenNotificationCount,
2020-07-23 16:22:57 +02:00
} from 'redux/selectors/notifications';
2020-08-21 21:44:54 +02:00
import { doReadNotifications, doNotificationList, doSeeAllNotifications } from 'redux/actions/notifications';
2020-07-23 16:22:57 +02:00
import NotificationsPage from './view';
const select = state => ({
notifications: selectNotifications(state),
fetching: selectIsFetchingNotifications(state),
unreadCount: selectUnreadNotificationCount(state),
2020-08-21 21:44:54 +02:00
unseenCount: selectUnseenNotificationCount(state),
2020-07-23 16:22:57 +02:00
});
2020-08-10 22:47:39 +02:00
export default connect(select, {
doReadNotifications,
2020-08-21 21:44:54 +02:00
doNotificationList,
doSeeAllNotifications,
2020-08-10 22:47:39 +02:00
})(NotificationsPage);