overleaf-cep/services/web/frontend/js/features/ide-react/components/unsaved-docs/unsaved-docs-locked-alert.tsx
Alf Eaton 8ca5360454 Reapply "Increase the length of unsaved doc time before the editor is locked" (#23723)
* Reapply "Increase the length of unsaved doc time before the editor is locked (#23431)"

This reverts commit d0efca398e59ca488c530ee9ec5ca76f29843679.

* Use pendingOpCreatedAt if inflightOpCreatedAt isn't set

GitOrigin-RevId: b3301d7cc1554215a4ba569537bd47beeefde20f
2025-02-20 09:06:31 +00:00

19 lines
497 B
TypeScript

import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import OLNotification from '@/features/ui/components/ol/ol-notification'
export const UnsavedDocsLockedAlert: FC = () => {
const { t } = useTranslation()
return (
<OLNotification
type="warning"
content={
<>
<strong>{t('connection_lost_with_unsaved_changes')}</strong>{' '}
{t('dont_reload_or_close_this_tab')} {t('your_changes_will_save')}
</>
}
/>
)
}