This commit is contained in:
mgabdev
2020-03-14 13:31:29 -04:00
parent d78dd971c0
commit 65af72faae
81 changed files with 1101 additions and 662 deletions

View File

@@ -1,28 +0,0 @@
import { injectIntl } from 'react-intl'
import { NotificationStack } from 'react-notification'
import { dismissAlert } from '../actions/alerts'
import { getAlerts } from '../selectors'
const mapStateToProps = (state, { intl }) => {
const notifications = getAlerts(state)
notifications.forEach(notification => ['title', 'message'].forEach(key => {
const value = notification[key]
if (typeof value === 'object') {
notification[key] = intl.formatMessage(value)
}
}))
return { notifications }
}
const mapDispatchToProps = (dispatch) => {
return {
onDismiss: alert => {
dispatch(dismissAlert(alert))
},
}
}
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(NotificationStack))

View File

@@ -5,9 +5,9 @@ import {
quoteCompose,
} from '../actions/compose';
import {
reblog,
repost,
favorite,
unreblog,
unrepost,
unfavorite,
pin,
unpin,
@@ -25,7 +25,7 @@ import { initMuteModal } from '../actions/mutes';
import { initReport } from '../actions/reports';
import { openModal } from '../actions/modal';
import { boostModal, deleteModal } from '../initial_state';
import { showAlertForError } from '../actions/alerts';
// import { showAlertForError } from '../actions/alerts';
import {
createRemovedAccount,
groupRemoveStatus
@@ -127,10 +127,10 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
},
onEmbed (status) {
dispatch(openModal('EMBED', {
url: status.get('url'),
onError: error => dispatch(showAlertForError(error)),
}));
// dispatch(openModal('EMBED', {
// url: status.get('url'),
// onError: error => dispatch(showAlertForError(error)),
// }));
},
onDelete (status, history) {