import React from 'react'; import { injectIntl } from 'react-intl'; import { NotificationStack } from 'react-notification'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { Button } from 'soapbox/components/ui'; import { dismissAlert } from '../../../actions/alerts'; import { getAlerts } from '../../../selectors'; const CustomNotificationStack = (props) => (
); const defaultBarStyleFactory = (index, style, notification) => { return Object.assign( {}, style, { bottom: `${14 + index * 12 + index * 42}px` }, ); }; const mapStateToProps = (state, { intl }) => { const notifications = getAlerts(state); notifications.forEach(notification => { ['title', 'message', 'actionLabel'].forEach(key => { const value = notification[key]; if (typeof value === 'object') { notification[key] = intl.formatMessage(value); } }); if (notification.action) { const { action } = notification; notification.action = (