Refactor alerts to TypeScript, remove react-notification dependency (#34239)

This commit is contained in:
Eugen Rochko 2025-03-25 19:25:07 +01:00 committed by GitHub
parent e1dbbf6c9d
commit 94d71c992e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 171 additions and 121 deletions

View file

@ -1,20 +0,0 @@
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));