mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
cb657d1f1c
Stop on first error info box in logs pane GitOrigin-RevId: cf11f65d582d98bea93c6506393940d9a6144c0d
34 lines
1 KiB
JavaScript
34 lines
1 KiB
JavaScript
import { useTranslation, Trans } from 'react-i18next'
|
|
import { Button } from 'react-bootstrap'
|
|
import PdfLogEntry from './pdf-log-entry'
|
|
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
|
|
|
|
export default function StopOnFirstErrorPrompt() {
|
|
const { t } = useTranslation()
|
|
const { setStopOnFirstError, startCompile } = useCompileContext()
|
|
return (
|
|
<PdfLogEntry
|
|
headerTitle={t('stop_on_first_error_enabled_title')}
|
|
formattedContent={
|
|
<>
|
|
<Trans
|
|
i18nKey="stop_on_first_error_enabled_description"
|
|
// eslint-disable-next-line react/jsx-key
|
|
components={[<strong />]}
|
|
/>{' '}
|
|
<Button
|
|
bsSize="xs"
|
|
bsStyle="info"
|
|
onClick={() => {
|
|
startCompile({ stopOnFirstError: false })
|
|
setStopOnFirstError(false)
|
|
}}
|
|
>
|
|
{t('disable_stop_on_first_error')}
|
|
</Button>
|
|
</>
|
|
}
|
|
level="info"
|
|
/>
|
|
)
|
|
}
|