import { selectHasError } from 'domains/interrupt/selectors'
import { useTranslations } from 'domains/translations/hooks'
import { useSelector } from 'react-redux'
import TranslationProposal from 'ui/components/translation-proposal'

export default function TranslationStatus() {
  const hasError = useSelector(selectHasError)

  const { isActive } = useTranslations()
  if (hasError) {
    return null
  }

  return !isActive ? <TranslationProposal /> : null
}
