overleaf/services/web/frontend/js/features/ide-react/components/unsaved-docs/unsaved-docs-locked-modal.tsx
Alf Eaton eb3e5037f8 Merge pull request #16335 from overleaf/ae-real-time-down
[ide-react] Improve handling of lost connection

GitOrigin-RevId: 89b641b2beca4f9de65551e6873b3c8c11bb1695
2024-01-04 09:03:05 +00:00

23 lines
698 B
TypeScript

import { FC } from 'react'
import { Modal } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import AccessibleModal from '@/shared/components/accessible-modal'
export const UnsavedDocsLockedModal: FC = () => {
const { t } = useTranslation()
return (
<AccessibleModal
show
onHide={() => {}} // It's not possible to hide this modal, but it's a required prop
className="lock-editor-modal"
backdrop={false}
keyboard={false}
>
<Modal.Header>
<Modal.Title>{t('connection_lost')}</Modal.Title>
</Modal.Header>
<Modal.Body>{t('sorry_the_connection_to_the_server_is_down')}</Modal.Body>
</AccessibleModal>
)
}