import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { createSubscribedElement } from '../../UnstatedUtils'; import AppContainer from '../../../services/AppContainer'; import AdminNotificationContainer from '../../../services/AdminNotificationContainer'; import GlobalNotificationList from './GlobalNotificationList'; class GlobalNotification extends React.Component { render() { const { t, adminNotificationContainer } = this.props; const { globalNotifications } = adminNotificationContainer.state; return (

{t('notification_setting.add_notification')}

{t('notification_setting.notification_list')}

{/* eslint-disable-next-line react/no-danger */} {globalNotifications.length !== 0 && ( )}
ON/OFF{t('notification_setting.trigger_path')} {t('notification_setting.trigger_events')} {t('notification_setting.notify_to')}
); } } const GlobalNotificationWrapper = (props) => { return createSubscribedElement(GlobalNotification, props, [AppContainer, AdminNotificationContainer]); }; GlobalNotification.propTypes = { t: PropTypes.func.isRequired, // i18next appContainer: PropTypes.instanceOf(AppContainer).isRequired, adminNotificationContainer: PropTypes.instanceOf(AdminNotificationContainer).isRequired, }; export default withTranslation()(GlobalNotificationWrapper);