import { useCallback } from 'react' import { useTranslation, Trans } from 'react-i18next' import OLButton from '@/features/ui/components/ol/ol-button' import PdfLogEntry from './pdf-log-entry' import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context' import { useStopOnFirstError } from '../../../shared/hooks/use-stop-on-first-error' export default function StopOnFirstErrorPrompt() { const { t } = useTranslation() const { startCompile, setAnimateCompileDropdownArrow } = useCompileContext() const { disableStopOnFirstError } = useStopOnFirstError({ eventSource: 'logs-pane', }) const handleDisableButtonClick = useCallback(() => { disableStopOnFirstError() startCompile({ stopOnFirstError: false }) setAnimateCompileDropdownArrow(true) }, [disableStopOnFirstError, startCompile, setAnimateCompileDropdownArrow]) return ( ]} />{' '} {t('disable_stop_on_first_error')} } level="info" /> ) }