Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Remove unused code
Tomas Valenta1b9122e038f3
diff --git a/hooks/useDocEditor.ts b/hooks/useDocEditor.tsindex 0a093106e..4bd564406 100644--- a/hooks/useDocEditor.ts+++ b/hooks/useDocEditor.ts@@ -1,6 +1,5 @@import {useEffect,- useReducer,useState,} from 'react'import { createDocument, Editor, getSchema } from '@tiptap/react'@@ -55,8 +54,6 @@ function useDocEditor({}) {const [editor, setEditor] = useState<Editor | null>(null)- const forceUpdate = useReducer(() => ({}), {})[1]-useEffect(function initialize() {const instance = new Editor({content: initialContent,@@ -84,12 +81,6 @@ function useDocEditor({if (t.transaction.docChanged) {onContentChange(t.transaction.doc.toJSON())}-- // requestAnimationFrame(() => {- // requestAnimationFrame(() => {- // forceUpdate()- // })- // })})setEditor(instance)@@ -100,7 +91,6 @@ function useDocEditor({}}, [onContentChange,- forceUpdate,// We don't want the initialContent in the dependencies because that would reload the editor when we type.// initialContent])