overleaf-cep/services/web/frontend/js/features/ide-redesign/components/pdf-preview/pdf-code-check-failed-banner.tsx
David 72ff927a52 Merge pull request #26311 from overleaf/dp-auto-compile-failure
Add a code check banner to the new editor

GitOrigin-RevId: 6ee01d8379247824f4ec0684809ad432c4617c96
2025-06-12 08:05:35 +00:00

22 lines
653 B
TypeScript

import MaterialIcon from '@/shared/components/material-icon'
import { useTranslation } from 'react-i18next'
import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context'
export default function PdfCodeCheckFailedBanner() {
const { t } = useTranslation()
const { codeCheckFailed } = useCompileContext()
if (!codeCheckFailed) {
return null
}
return (
<div className="pdf-code-check-failed-banner-container">
<div className="pdf-code-check-failed-banner">
<MaterialIcon unfilled type="picture_as_pdf" />
{t('code_check_failed_explanation')}
</div>
</div>
)
}