1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-15 15:18:30 +09:00
YuruToot/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 03:39:18 +09:00
import { connect } from 'react-redux';
2016-11-21 03:39:18 +09: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));