lbry-desktop/ui/component/notificationHeaderButton/index.js
2020-07-23 11:03:00 -04:00

20 lines
636 B
JavaScript

import { connect } from 'react-redux';
import {
selectNotifications,
selectIsFetchingNotifications,
selectUnreadNotificationCount,
} from 'redux/selectors/notifications';
import { doReadNotifications } from 'redux/actions/notifications';
import { selectUser } from 'redux/selectors/user';
import NotificationHeaderButton from './view';
const select = state => ({
notifications: selectNotifications(state),
fetching: selectIsFetchingNotifications(state),
unreadCount: selectUnreadNotificationCount(state),
user: selectUser(state),
});
export default connect(select, {
doReadNotifications,
})(NotificationHeaderButton);