import { useTranslation } from 'react-i18next' import PreviewLogsPaneEntry from '../../preview/components/preview-logs-pane-entry' import { memo } from 'react' import classnames from 'classnames' import PdfValidationIssue from './pdf-validation-issue' import TimeoutUpgradePrompt from './timeout-upgrade-prompt' import PdfPreviewError from './pdf-preview-error' import PdfClearCacheButton from './pdf-clear-cache-button' import PdfDownloadFilesButton from './pdf-download-files-button' import PdfLogsEntries from './pdf-logs-entries' import withErrorBoundary from '../../../infrastructure/error-boundary' import ErrorBoundaryFallback from './error-boundary-fallback' import PdfCodeCheckFailedNotice from '../../preview/components/pdf-code-check-failed-notice' import PdfLogsPaneInfoNotice from '../../preview/components/pdf-logs-pane-info-notice' import { useCompileContext } from '../../../shared/context/compile-context' function PdfLogsViewer() { const { codeCheckFailed, error, logEntries, rawLog, validationIssues, showLogs, } = useCompileContext() const { t } = useTranslation() return (
{codeCheckFailed && } {error && } {error === 'timedout' && } {validationIssues && Object.entries(validationIssues).map(([name, issue]) => ( ))} {logEntries?.all && } {rawLog && ( )}
) } export default withErrorBoundary(memo(PdfLogsViewer), () => ( ))