File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
components/Minutes/Tiptap Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,6 @@ export default function Tiptap() {
4949 handleSocketEvent ( {
5050 actionType : "updateContent" ,
5151 payload : { content : editor . getHTML ( ) } ,
52- callback : ( ) => {
53- updateContent ( editor . getHTML ( ) ) ;
54- } ,
5552 } ) ,
5653 1500 ,
5754 ) ;
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export default function NodeListProvider({ children }: { children: ReactNode })
5555 const stage = useRef < Konva . Stage > ( ) ;
5656 const socket = useConnectionStore ( ( state ) => state . socket ) ;
5757 const handleSocketEvent = useConnectionStore ( ( state ) => state . handleSocketEvent ) ;
58+ const currentRole = useConnectionStore ( ( state ) => state . currentRole ) ;
5859
5960 useEffect ( ( ) => {
6061 if ( ! socket ) return ;
@@ -86,7 +87,6 @@ export default function NodeListProvider({ children }: { children: ReactNode })
8687 payload : initializedNodes ,
8788 callback : ( response ) => {
8889 overrideNodeData ( response ) ;
89- overrideHistory ( JSON . stringify ( response ) ) ;
9090 } ,
9191 } ) ;
9292 } ,
@@ -97,7 +97,9 @@ export default function NodeListProvider({ children }: { children: ReactNode })
9797 updateTitle ( updatedTitle . title ) ;
9898 } ,
9999 updateContent : ( updatedContent ) => {
100- updateContent ( updatedContent . content ) ;
100+ if ( currentRole === "editor" ) {
101+ updateContent ( updatedContent . content ) ;
102+ }
101103 } ,
102104 } ;
103105
You can’t perform that action at this time.
0 commit comments