diff --git a/client/src/components/Minutes/Tiptap/index.tsx b/client/src/components/Minutes/Tiptap/index.tsx index d6436a4..23a0224 100644 --- a/client/src/components/Minutes/Tiptap/index.tsx +++ b/client/src/components/Minutes/Tiptap/index.tsx @@ -49,9 +49,6 @@ export default function Tiptap() { handleSocketEvent({ actionType: "updateContent", payload: { content: editor.getHTML() }, - callback: () => { - updateContent(editor.getHTML()); - }, }), 1500, ); diff --git a/client/src/store/NodeListProvider.tsx b/client/src/store/NodeListProvider.tsx index a85c88a..3ec75f8 100644 --- a/client/src/store/NodeListProvider.tsx +++ b/client/src/store/NodeListProvider.tsx @@ -55,6 +55,7 @@ export default function NodeListProvider({ children }: { children: ReactNode }) const stage = useRef(); const socket = useConnectionStore((state) => state.socket); const handleSocketEvent = useConnectionStore((state) => state.handleSocketEvent); + const currentRole = useConnectionStore((state) => state.currentRole); useEffect(() => { if (!socket) return; @@ -86,7 +87,6 @@ export default function NodeListProvider({ children }: { children: ReactNode }) payload: initializedNodes, callback: (response) => { overrideNodeData(response); - overrideHistory(JSON.stringify(response)); }, }); }, @@ -97,7 +97,9 @@ export default function NodeListProvider({ children }: { children: ReactNode }) updateTitle(updatedTitle.title); }, updateContent: (updatedContent) => { - updateContent(updatedContent.content); + if (currentRole === "editor") { + updateContent(updatedContent.content); + } }, };