File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
components/Minutes/Tiptap Expand file tree Collapse file tree 2 files changed +4
-4
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 ;
@@ -97,7 +98,9 @@ export default function NodeListProvider({ children }: { children: ReactNode })
9798 updateTitle ( updatedTitle . title ) ;
9899 } ,
99100 updateContent : ( updatedContent ) => {
100- updateContent ( updatedContent . content ) ;
101+ if ( currentRole === "editor" ) {
102+ updateContent ( updatedContent . content ) ;
103+ }
101104 } ,
102105 } ;
103106
You can’t perform that action at this time.
0 commit comments