diff options
author | Ondřej Hruška <ondra@ondrovo.com> | 2017-07-14 17:03:43 +0200 |
---|---|---|
committer | beatrix <beatrix.bitrot@gmail.com> | 2017-07-14 11:03:43 -0400 |
commit | 75aafc932e42b5dba1030700bb47be0db41b1ab5 (patch) | |
tree | 12c19b09e3ec5e96d71e219ddee0e99e4c2ff7e2 /app/javascript/glitch/components/notification/container.js | |
parent | 6ce806f91304937174fb593ea1f343b528fa7cd6 (diff) |
Added buttons and menu items to dismiss individual notifications (#76)
* Added DELETE verb for notifications * Added notification dismiss button to status dropdown * Added reveal-on-hover notif dismiss button, added FollowNotification component
Diffstat (limited to 'app/javascript/glitch/components/notification/container.js')
-rw-r--r-- | app/javascript/glitch/components/notification/container.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/javascript/glitch/components/notification/container.js b/app/javascript/glitch/components/notification/container.js index c58ef4bd2..60303537d 100644 --- a/app/javascript/glitch/components/notification/container.js +++ b/app/javascript/glitch/components/notification/container.js @@ -6,6 +6,7 @@ import { makeGetNotification } from '../../../mastodon/selectors'; // Our imports // import Notification from '.'; +import { deleteNotification } from '../../../mastodon/actions/notifications'; const makeMapStateToProps = () => { const getNotification = makeGetNotification(); @@ -18,4 +19,10 @@ const makeMapStateToProps = () => { return mapStateToProps; }; -export default connect(makeMapStateToProps)(Notification); +const mapDispatchToProps = (dispatch) => ({ + onDeleteNotification (id) { + dispatch(deleteNotification(id)); + }, +}); + +export default connect(makeMapStateToProps, mapDispatchToProps)(Notification); |