lbry-desktop/ui/component/notificationHeaderButton/index.js

21 lines
636 B
JavaScript
Raw Normal View History

2020-07-23 16:22:57 +02:00
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);