import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; const ApiErrorMessage = (props) => { const { t, errorMessage, linkPath } = props; function renderMessage() { switch (errorMessage) { case 'Page exists': return ( { t('page_api_error.already_exists') } {linkPath} ); default: return null; } } return ( <> {renderMessage()} > ); // TODO GW-79 Set according to error message //