Progress
This commit is contained in:
@@ -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))
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user