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

21 lines
640 B
JavaScript
Raw Permalink Normal View History

2020-07-23 16:22:57 +02:00
import { connect } from 'react-redux';
import {
selectNotifications,
selectIsFetchingNotifications,
2020-12-14 19:52:17 +01:00
selectUnseenNotificationCount,
2020-07-23 16:22:57 +02:00
} from 'redux/selectors/notifications';
2020-12-14 19:52:17 +01:00
import { doSeeAllNotifications } from 'redux/actions/notifications';
2020-07-23 16:22:57 +02:00
import { selectUser } from 'redux/selectors/user';
import NotificationHeaderButton from './view';
const select = state => ({
notifications: selectNotifications(state),
fetching: selectIsFetchingNotifications(state),
2020-12-14 19:52:17 +01:00
unseenCount: selectUnseenNotificationCount(state),
2020-07-23 16:22:57 +02:00
user: selectUser(state),
});
export default connect(select, {
2020-12-14 19:52:17 +01:00
doSeeAllNotifications,
2020-07-23 16:22:57 +02:00
})(NotificationHeaderButton);