Skip to content

Commit 69e627a

Browse files
committed
Chore: editing
1 parent 768dbac commit 69e627a

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

src/views/meeting/components/MindMapComponent.tsx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ const MindMapComponent = ({
9090
console.log(data);
9191

9292
if (data.event === "liveOn") {
93-
// GPT 응답이 들어온 경우
94-
setSummary((prev) => [
95-
...prev,
96-
{
97-
time: formattedTime,
98-
title: data.summary.title,
99-
item: data.summary.content,
100-
},
101-
]);
102-
10393
setInitialNodes(data.nodes);
10494

10595
const edges = data.nodes
@@ -111,15 +101,29 @@ const MindMapComponent = ({
111101
}));
112102

113103
setInitialEdges(edges);
104+
}
105+
106+
if (data.event === "summary") {
107+
setSummary((prev) => [
108+
...prev,
109+
{
110+
time: formattedTime,
111+
title: data.title,
112+
item: data.content,
113+
},
114+
]);
115+
}
114116

117+
if (data.event === "main_keywords") {
115118
setMainKeyword(
116-
JSON.parse(data.mainKeywords).map((x: any, i: number) => ({
117-
id: i,
118-
value: x,
119-
}))
119+
data.keywords.map((x: any, i: number) => ({ id: i, value: x }))
120120
);
121+
}
122+
123+
if (data.event === "recommended_keywords") {
121124
setRecommendKeyword(
122-
JSON.parse(data.recommendedKeywords)
125+
data.keywords[0]
126+
.split('\n')
123127
.filter(Boolean)
124128
.map((x: any, i: number) => ({ id: i, value: x }))
125129
);
@@ -175,7 +179,6 @@ const MindMapComponent = ({
175179
const updated = [...prev, newScript];
176180

177181
if (updated.length >= 2 && clientRef.current?.connected) {
178-
console.log('스크립트 전송')
179182
const testString = updated.map((item) => item.script).join(" ");
180183
const data = {
181184
event: "script",

0 commit comments

Comments
 (0)