mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-05 19:29:03 +01:00
20 lines
545 B
JavaScript
20 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));
|