import React from 'react'; import PropTypes from 'prop-types'; import { ActionRow, AlertModal, Button } from '@openedx/paragon'; import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import ModalErrorListItem from './ModalErrorListItem'; import messages from './messages'; const ModalError = ({ intl, isError, handleUndoChanges, showErrorModal, errorList, settingsData, }) => ( )} >

{errorList.length} validation error }} />


); ModalError.propTypes = { intl: intlShape.isRequired, isError: PropTypes.bool.isRequired, handleUndoChanges: PropTypes.func.isRequired, showErrorModal: PropTypes.func.isRequired, errorList: PropTypes.arrayOf(PropTypes.shape({ key: PropTypes.string, message: PropTypes.string, })).isRequired, settingsData: PropTypes.shape({}).isRequired, }; export default injectIntl(ModalError);