Files
mastodon/app/javascript/glitch/components/notification/overlay/container.js
2017-08-14 15:07:22 -07:00

40 lines
875 B
JavaScript

// <NotificationOverlayContainer>
// ==============================
// For code documentation, please see:
// https://glitch-soc.github.io/docs/javascript/glitch/notification/overlay/container
// * * * * * * * //
// Imports
// -------
// Package imports.
import { connect } from 'react-redux';
// Mastodon imports.
import { markNotificationForDelete } from 'mastodon/actions/notifications';
// Our imports.
import NotificationOverlay from './notification_overlay';
// State mapping
// -------------
const mapStateToProps = state => ({
show: state.getIn(['notifications', 'cleaningMode']),
});
// Dispatch mapping
// ----------------
const mapDispatchToProps = dispatch => ({
onMarkForDelete(id, yes) {
dispatch(markNotificationForDelete(id, yes));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(NotificationOverlay);