// Desclaimer: not using openmrs provided (EmptyState,ErrorState) to avoid repeated header titles and customize the message since provided ones are contexted to patient chart import { Tile } from '@carbon/react'; import { EmptyDataIllustration } from '@openmrs/esm-patient-common-lib'; import React, { type FC } from 'react'; import styles from './ward-patient.scss'; import { useTranslation } from 'react-i18next'; type EmptyStateProps = { message?: string; }; export const EmptyState: FC = ({ message }) => { return (

{message}

); }; type ErrorStateProps = { error?: Error; }; export const ErrorState: FC = ({ error }) => { const { t } = useTranslation(); return ( {t('error', 'Error')} {`${(error as any)?.response?.status}: `} {(error as any)?.response?.statusText}

{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.', )}

{' '}
); };