chinwagsocial/app/javascript/mastodon/features/ui/containers/notifications_container.js

21 lines
545 B
JavaScript
Raw Normal View History

import { injectIntl } from 'react-intl';
2016-11-21 05:39:18 +11:00
import { connect } from 'react-redux';
2016-11-21 05:39:18 +11:00
import { NotificationStack } from 'react-notification';
import { dismissAlert } from 'mastodon/actions/alerts';
import { getAlerts } from 'mastodon/selectors';
const mapStateToProps = (state, { intl }) => ({
notifications: getAlerts(state, { intl }),
});
const mapDispatchToProps = (dispatch) => ({
onDismiss (alert) {
dispatch(dismissAlert(alert));
},
});
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(NotificationStack));