From 79c72517c295e77e3614b026b98359fdb09c6265 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Mon, 24 Aug 2026 14:50:24 +0330 Subject: [PATCH] fix(admin-panel): remove duplicate isMountedRef declaration in RichTextEditor --- .../src/components/ui/RichTextEditor.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/frontend/admin-panel/src/components/ui/RichTextEditor.tsx b/frontend/admin-panel/src/components/ui/RichTextEditor.tsx index 65fd0ce2..37d18539 100644 --- a/frontend/admin-panel/src/components/ui/RichTextEditor.tsx +++ b/frontend/admin-panel/src/components/ui/RichTextEditor.tsx @@ -61,19 +61,6 @@ export default function RichTextEditor({ } }, [value]); - const isMountedRef = useRef(false); - - useEffect(() => { - if (editorRef.current) { - if (!isMountedRef.current) { - editorRef.current.innerHTML = value || ''; - isMountedRef.current = true; - } else if (editorRef.current.innerHTML !== (value || '')) { - editorRef.current.innerHTML = value || ''; - } - } - }, [value]); - const exec = (command: string, val: string | undefined = undefined) => { document.execCommand(command, false, val); if (editorRef.current) {