import React from 'react'; import { FormattedMessage as Message } from 'react-intl'; import messages from './errorsDict.messages'; export default { resolve(error) { return errorsMap[error] ? errorsMap[error]() : error; } } const errorsMap = { 'error.login_required': () => , 'error.login_not_exist': () => , 'error.password_required': () => , 'error.password_incorrect': () => (
) }} />
), 'error.username_required': () => , 'error.email_required': () => , 'error.email_invalid': () => , 'error.email_is_tempmail': () => , 'error.email_not_available': () => (
) }} />
), 'error.rePassword_required': () => , 'error.password_too_short': () => , 'error.rePassword_does_not_match': () => , 'error.rulesAgreement_required': () => , 'error.you_must_accept_rules': () => this.errorsMap['error.rulesAgreement_required'](), 'error.key_required': () => , 'error.key_is_required': () => this.errorsMap['error.key_required'](), 'error.key_not_exists': () => , 'error.newPassword_required': () => , 'error.newRePassword_required': () => , 'error.newRePassword_does_not_match': () => };