Skip to content

Commit d84ea24

Browse files
authored
메인 머지 해결했는데 에러날 것 같음
37 feat 미팅페이지 사이드바 상단바 api 연결
2 parents 4a829a4 + 48f3e7d commit d84ea24

File tree

4 files changed

+486
-39
lines changed

4 files changed

+486
-39
lines changed

src/views/meeting/components/MindMapComponent.tsx

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//수정
2+
13
import React, { useCallback } from "react";
24
import {
35
ReactFlow,
@@ -27,8 +29,10 @@ import { useEffect, useState, useRef } from "react";
2729
// import { Client } from "@stomp/stompjs";
2830
import html2canvas from 'html2canvas';
2931

32+
3033
// type
3134
import { conferenceData } from "@/types/conferanceData";
35+
import { RealTimeSummaryData } from "@/types/realTimeSummaryData";
3236

3337
interface scriptData {
3438
time: string;
@@ -38,11 +42,13 @@ interface scriptData {
3842
interface MindMapComponentProps {
3943
setScripts: React.Dispatch<React.SetStateAction<scriptData[]>>;
4044
conferenceData: conferenceData;
45+
setSummary: React.Dispatch<React.SetStateAction<RealTimeSummaryData[]>>;
4146
}
4247

4348
const MindMapComponent = ({
4449
setScripts,
4550
conferenceData,
51+
setSummary,
4652
}: MindMapComponentProps) => {
4753
const {
4854
// transcript,
@@ -57,8 +63,8 @@ const MindMapComponent = ({
5763
} = UseSpeechToText();
5864

5965
const { formattedTime } = useRecordingTimer(isRecording, isPaused);
60-
61-
const [, setScriptList] = useState<
66+
67+
const [scriptList, setScriptList] = useState<
6268
{ time: string; script: string }[]
6369
>([]);
6470

@@ -130,12 +136,23 @@ const MindMapComponent = ({
130136
const testString = updated.map((item) => item.script).join(" ");
131137

132138
let data = {
133-
"event": "script",
134-
"projectId": conferenceData.projectId,
135-
"scription": testString
136-
}
139+
event: "script",
140+
projectId: conferenceData.projectId,
141+
scription: testString,
142+
};
137143
postScript(data).then((res: any) => {
138144
setScriptList([]);
145+
146+
setSummary((prev) => [
147+
...prev,
148+
{
149+
time: formattedTime,
150+
title: res.data.data.summary.title,
151+
item: res.data.data.summary.content,
152+
},
153+
]);
154+
155+
139156
setInitialNodes(res.data.data.nodes)
140157
const edges = res.data.data.nodes
141158
.filter((node: any) => node.parentId)
@@ -146,6 +163,7 @@ const MindMapComponent = ({
146163
}));
147164

148165
setInitialEdges(edges);
166+
149167
});
150168
}
151169

@@ -196,6 +214,7 @@ const MindMapComponent = ({
196214

197215
const [initialNodes, setInitialNodes] = useState<Node[]>([
198216
{
217+
199218
id: '1',
200219
type: 'input',
201220
data: { label: '회의 키워드' },
@@ -205,6 +224,7 @@ const MindMapComponent = ({
205224
id: '2',
206225
type: 'output',
207226
data: { label: '다음 키워드' },
227+
208228
position: { x: 150, y: 0 },
209229
},
210230
]);
@@ -267,11 +287,11 @@ const MindMapComponent = ({
267287
</p>
268288
<button
269289
className="btn-mic"
270-
onClick={() => (
290+
onClick={() =>
271291
toggleListening().then(() => {
272292
setMode("live");
273293
})
274-
)}
294+
}
275295
>
276296
녹음 시작하기
277297
</button>

src/views/meeting/page/MeetingPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// 수정
2+
13
// style
24
import "@/views/meeting/style/meeting.sass";
35
import HeaderBar from "../components/HeaderBar";
@@ -85,7 +87,7 @@ const MeetingPage = () => {
8587
<MindMapComponent
8688
setScripts={setScripts}
8789
conferenceData={conferenceData}
88-
// setSummary={setSummary}
90+
setSummary={setSummary}
8991
/>
9092
</div>
9193
</>

src/views/meeting/style/side-bar.sass

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
overflow-y: auto
113113

114114
.des-wrap
115+
+margin(0 0 10px 0)
115116
.des-timestamp
116117
color: $gray-600
117118
font-family: Pretendard

0 commit comments

Comments
 (0)