diff --git a/client/src/features/editor/Editor.tsx b/client/src/features/editor/Editor.tsx index 521e6c7e..aec09c34 100644 --- a/client/src/features/editor/Editor.tsx +++ b/client/src/features/editor/Editor.tsx @@ -35,7 +35,6 @@ interface EditorProps { onTitleChange: (title: string) => void; pageId: string; serializedEditorData: serializedEditorDataProps; - updatePageData: (pageId: string, newData: serializedEditorDataProps) => void; } interface ClipboardMetadata { value: string; @@ -43,12 +42,7 @@ interface ClipboardMetadata { color: TextColorType | undefined; backgroundColor: BackgroundColorType | undefined; } -export const Editor = ({ - onTitleChange, - pageId, - serializedEditorData, - updatePageData, -}: EditorProps) => { +export const Editor = ({ onTitleChange, pageId, serializedEditorData }: EditorProps) => { const { sendCharInsertOperation, sendCharDeleteOperation, @@ -194,7 +188,7 @@ export const Editor = ({ linkedList: editorCRDT.current.LinkedList, }); }, - [sendCharInsertOperation, sendCharDeleteOperation, editorCRDT, pageId, updatePageData], + [sendCharInsertOperation, sendCharDeleteOperation, editorCRDT, pageId], ); const handleKeyDown = ( @@ -356,7 +350,7 @@ export const Editor = ({ block.crdt.currentCaret = caretPosition; }, - [editorCRDT, pageId, sendCharInsertOperation, updatePageData], + [editorCRDT, pageId, sendCharInsertOperation], ); const subscriptionRef = useRef(false); diff --git a/client/src/features/workSpace/WorkSpace.tsx b/client/src/features/workSpace/WorkSpace.tsx index 97c32792..2456efd5 100644 --- a/client/src/features/workSpace/WorkSpace.tsx +++ b/client/src/features/workSpace/WorkSpace.tsx @@ -23,7 +23,6 @@ export const WorkSpace = () => { updatePageTitle, initPages, initPagePosition, - updatePageData, openPage, } = usePagesManage(workspace, clientId); const visiblePages = pages.filter((page) => page.isVisible); @@ -69,7 +68,6 @@ export const WorkSpace = () => { handlePageSelect={selectPage} handlePageClose={closePage} handleTitleChange={updatePageTitle} - updatePageData={updatePageData} /> ) : null, )}