import PropTypes from 'prop-types'; import React from 'react'; import { withTranslation } from 'react-i18next'; class EditorAccessibility extends React.Component { componentDidMount() { } render() { const messages = []; if (this.props.lintMessages.length > 0) { this.props.lintMessages.forEach((lintMessage, i) => { messages.push((
  • {lintMessage.severity} in line {lintMessage.line} : {lintMessage.message}
  • )); }); } else { messages.push(
  • {this.props.t('EditorAccessibility.NoLintMessages')}
  • ); } return (

    {this.props.t('EditorAccessibility.CurrentLine')}

    ); } } EditorAccessibility.propTypes = { lintMessages: PropTypes.arrayOf(PropTypes.shape({ severity: PropTypes.string.isRequired, line: PropTypes.number.isRequired, message: PropTypes.string.isRequired, id: PropTypes.number.isRequired })).isRequired, t: PropTypes.func.isRequired }; export default withTranslation()(EditorAccessibility);