2020-07-23 16:22:57 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
|
|
selectNotifications,
|
2021-03-25 05:37:53 +01:00
|
|
|
selectNotificationsFiltered,
|
2020-07-23 16:22:57 +02:00
|
|
|
selectIsFetchingNotifications,
|
|
|
|
selectUnreadNotificationCount,
|
2020-08-21 21:44:54 +02:00
|
|
|
selectUnseenNotificationCount,
|
2021-04-29 21:10:20 +02:00
|
|
|
selectNotificationCategories,
|
2020-07-23 16:22:57 +02:00
|
|
|
} from 'redux/selectors/notifications';
|
2021-08-27 12:29:58 +02:00
|
|
|
import { doCommentReactList } from 'redux/actions/comments';
|
|
|
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
2021-12-29 09:09:54 +01:00
|
|
|
import {
|
|
|
|
doReadNotifications,
|
|
|
|
doNotificationList,
|
|
|
|
doSeeAllNotifications,
|
|
|
|
doNotificationCategories,
|
|
|
|
} from 'redux/actions/notifications';
|
2020-07-23 16:22:57 +02:00
|
|
|
import NotificationsPage from './view';
|
|
|
|
|
2021-03-25 05:37:53 +01:00
|
|
|
const select = (state) => ({
|
2020-07-23 16:22:57 +02:00
|
|
|
notifications: selectNotifications(state),
|
2021-03-25 05:37:53 +01:00
|
|
|
notificationsFiltered: selectNotificationsFiltered(state),
|
2021-04-29 21:10:20 +02:00
|
|
|
notificationCategories: selectNotificationCategories(state),
|
2020-07-23 16:22:57 +02:00
|
|
|
fetching: selectIsFetchingNotifications(state),
|
|
|
|
unreadCount: selectUnreadNotificationCount(state),
|
2020-08-21 21:44:54 +02:00
|
|
|
unseenCount: selectUnseenNotificationCount(state),
|
2021-08-27 12:29:58 +02:00
|
|
|
activeChannel: selectActiveChannelClaim(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,
|
2021-12-29 09:09:54 +01:00
|
|
|
doNotificationCategories,
|
2020-08-21 21:44:54 +02:00
|
|
|
doSeeAllNotifications,
|
2021-08-27 12:29:58 +02:00
|
|
|
doCommentReactList,
|
2020-08-10 22:47:39 +02:00
|
|
|
})(NotificationsPage);
|