Merge pull request #23714 from overleaf/ae-revert-unsaved-docs

Revert "Increase the length of unsaved doc time before the editor is locked"

GitOrigin-RevId: 0f2d257a55ebc3353ded2b10d505bfdb2e85f402
This commit is contained in:
Alf Eaton
2025-02-20 09:05:53 +00:00
committed by Copybot
parent 483c97a484
commit 432bbe0db8
10 changed files with 56 additions and 98 deletions
@@ -3,15 +3,13 @@ import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-
import { useTranslation } from 'react-i18next'
import OLNotification from '@/features/ui/components/ol/ol-notification'
const MAX_UNSAVED_ALERT_SECONDS = 15
export const UnsavedDocsAlert: FC<{ unsavedDocs: Map<string, number> }> = ({
unsavedDocs,
}) => (
<>
{[...unsavedDocs.entries()].map(
([docId, seconds]) =>
seconds >= MAX_UNSAVED_ALERT_SECONDS && (
seconds > 8 && (
<UnsavedDocAlert key={docId} docId={docId} seconds={seconds} />
)
)}