import React from 'react'; import { Layer, Tile } from '@carbon/react'; import { useTranslation } from 'react-i18next'; import { useLayoutType } from '@openmrs/esm-framework'; import styles from './error-state.scss'; interface ErrorStateProps { error: Error; } const ErrorState: React.FC = ({ error }) => { const { t } = useTranslation(); const isTablet = useLayoutType() === 'tablet'; return (

{t('forms', 'Forms')}

{t('error', 'Error')}: {error?.message}

{t( 'errorCopy', 'Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.', )}

); }; export default ErrorState;