overleaf/services/web/frontend/js/features/ide-react/components/unsaved-docs/unsaved-docs-locked-modal.tsx
Alf Eaton 8dbf2b64f8 [ide-react] Notify about unsaved changes (#16163)
* Notify about unsaved changes
* Move system message components and types to shared folder
* Add system messages component

GitOrigin-RevId: ab81a24888847bd9a8a390fd1af6b58f471f7a4b
2023-12-15 09:03:27 +00:00

22 lines
687 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
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>
)
}