From 730abf584a715800705b92ce38c2860977eaf6a1 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 5 Oct 2022 10:54:04 -0400 Subject: [PATCH] Revert "Warn whenever rich text editor has unsaved changes" This reverts commit 419219c7030824abf57de1b86f7c43537a65493a. --- web/components/editor.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web/components/editor.tsx b/web/components/editor.tsx index 5b075039..27e8ac45 100644 --- a/web/components/editor.tsx +++ b/web/components/editor.tsx @@ -42,7 +42,6 @@ import ItalicIcon from 'web/lib/icons/italic-icon' import LinkIcon from 'web/lib/icons/link-icon' import { getUrl } from 'common/util/parse' import { TiptapSpoiler } from 'common/util/tiptap-spoiler' -import { useWarnUnsavedChanges } from 'web/hooks/use-warn-unsaved-changes' const DisplayImage = Image.configure({ HTMLAttributes: { @@ -151,9 +150,6 @@ export function useTextEditor(props: { editor?.setEditable(!disabled) }, [editor, disabled]) - const isEditorFilled = editor != null && !editor.isEmpty - useWarnUnsavedChanges(isEditorFilled) - return { editor, upload } }