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' function PdfPreviewError({ error }) { const { t } = useTranslation() const { startCompile } = useCompileContext() switch (error) { case 'rendering-error-expected': return (