Skip to content

Commit d3cd22f

Browse files
authored
Merge pull request #251 from boostcampwm-2024/dev
[fix-6주차 배포]
2 parents fd58e41 + 0c97c17 commit d3cd22f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

client/src/components/Minutes/Tiptap/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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
);

client/src/store/NodeListProvider.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)