lbry-desktop/ui/component/headerNotificationButton/index.js
Rave | 図書館猫 54ee4ee94a
Notification menu (#1652)
* Save notification menu prototype

* Add dynamic links

* Add timestamps

* Mark as seen on click

* Fix guest mode

* Fix discussion links & channel thumbnails

* Adjust some details

* Adjust theme

* Replaxe Menu with MuiMenu

* Fix Mui behavior & transitions

* Adjust Mui menu behavior

* Adjust some padding

* Fix read & see

* Clean code

* Adjust border on top notification

* Add case for comment replies

* Save

* Make alignment pixel perfect

* Clean code

* Adjust gif avatars, stickers & tips

* Add delete function

* Add delete icon hover effect

* Add outline to delete icon

* Fix seeNotification call

* Add case for empty notification listä
2022-06-09 10:29:56 -04:00

26 lines
973 B
JavaScript

import { connect } from 'react-redux';
import { selectNotifications, selectUnseenNotificationCount } from 'redux/selectors/notifications';
import {
doReadNotifications,
doSeeNotifications,
doDeleteNotification,
doSeeAllNotifications,
} from 'redux/actions/notifications';
import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
import NotificationHeaderButton from './view';
const select = (state) => ({
notifications: selectNotifications(state),
unseenCount: selectUnseenNotificationCount(state),
user: selectUser(state),
authenticated: selectUserVerifiedEmail(state),
});
const perform = (dispatch, ownProps) => ({
readNotification: ([id]) => dispatch(doReadNotifications([id])),
seeNotification: ([id]) => dispatch(doSeeNotifications([id])),
deleteNotification: (id) => dispatch(doDeleteNotification(id)),
doSeeAllNotifications: doSeeAllNotifications,
});
export default connect(select, perform)(NotificationHeaderButton);