mirror of
https://github.com/funamitech/mastodon
synced 2024-12-14 14:49:01 +09:00
21 lines
545 B
JavaScript
21 lines
545 B
JavaScript
import { injectIntl } from 'react-intl';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
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));
|