mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-31 02:00:07 +02:00

Add a code check banner to the new editor GitOrigin-RevId: 6ee01d8379247824f4ec0684809ad432c4617c96
22 lines
653 B
TypeScript
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>
|
|
)
|
|
}
|