import PropTypes from 'prop-types' import { useTranslation, Trans } from 'react-i18next' import { memo, useCallback } from 'react' import { Button } from 'react-bootstrap' import PdfLogEntry from './pdf-log-entry' import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context' import { useStopOnFirstError } from '../../../shared/hooks/use-stop-on-first-error' import getMeta from '../../../utils/meta' function PdfPreviewError({ error }) { const { t } = useTranslation() const { startCompile } = useCompileContext() switch (error) { case 'rendering-error-new-domain': return ( , /* eslint-disable-next-line jsx-a11y/anchor-has-content */ , ]} /> } level="warning" /> ) case 'rendering-error-expected': return (