import { useTranslation } from 'react-i18next' import PdfLogEntryRawContent from './pdf-log-entry-raw-content' import PropTypes from 'prop-types' import importOverleafModules from '../../../../macros/import-overleaf-module.macro' const pdfLogEntryComponents = importOverleafModules('pdfLogEntryComponents') export default function PdfLogEntryContent({ rawContent, formattedContent, extraInfoURL, index, logEntry, }) { const { t } = useTranslation() return (
{formattedContent && (
{formattedContent}
)} {extraInfoURL && (
{t('log_hint_extra_info')}
)} {logEntry && pdfLogEntryComponents.map( ({ import: { default: Component }, path }) => ( ) )} {rawContent && ( )}
) } PdfLogEntryContent.propTypes = { rawContent: PropTypes.string, formattedContent: PropTypes.node, extraInfoURL: PropTypes.string, index: PropTypes.number, logEntry: PropTypes.any, }