import React from 'react'; import classNames from 'classnames'; import { Tag } from '@carbon/react'; import { useTranslation } from 'react-i18next'; import { type DiagnosisItem, type Note } from '../../types/index'; import styles from './past-visit-summary.scss'; interface NotesProps { notes: Array; diagnoses: Array; } const Notes: React.FC = ({ notes, diagnoses }) => { const { t } = useTranslation(); return (
{diagnoses.length > 0 ? diagnoses.map((d: DiagnosisItem, i) => ( {d.diagnosis} )) : null} {notes.length ? ( notes.map((note: Note, i) => (

{note.note}

{note.provider.name ? {note.provider.name} : null} ยท {note.time}

)) ) : (

{t('noNotesFound', 'No notes found')}

)}
); }; export default Notes;