pdf-code-check-failed-banner.tsx 653 B

12345678910111213141516171819202122
  1. import MaterialIcon from '@/shared/components/material-icon'
  2. import { useTranslation } from 'react-i18next'
  3. import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context'
  4. export default function PdfCodeCheckFailedBanner() {
  5. const { t } = useTranslation()
  6. const { codeCheckFailed } = useCompileContext()
  7. if (!codeCheckFailed) {
  8. return null
  9. }
  10. return (
  11. <div className="pdf-code-check-failed-banner-container">
  12. <div className="pdf-code-check-failed-banner">
  13. <MaterialIcon unfilled type="picture_as_pdf" />
  14. {t('code_check_failed_explanation')}
  15. </div>
  16. </div>
  17. )
  18. }