import { Trans, useLingui } from '@lingui/react/macro'; import getHTMLText from '../utils/getHTMLText'; import Icon from './icon'; import TranslationBlock from './translation-block'; function TranslatedBioSheet({ note, fields, onClose }) { const { t } = useLingui(); const fieldsText = fields ?.map(({ name, value }) => `${name}\n${getHTMLText(value)}`) .join('\n\n') || ''; const text = getHTMLText(note) + (fieldsText ? `\n\n${fieldsText}` : ''); return (
{!!onClose && ( )}

Translated Bio

{text}

); } export default TranslatedBioSheet;