Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions apps/demo-web/app/mentoring/live/mentor/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ function MentorLiveContent({ mentoringId, role, userId, userName }: { mentoringI
const [isLoadingQuestions, setIsLoadingQuestions] = useState(false);
const [completedIds, setCompletedIds] = useState<number[]>([]);
const [clusters, setClusters] = useState<any[]>([]);
const [isClustering, setIsClustering] = useState(false);

// 비공개 모드 UI 상태 관리
const [isPrivateMode, setIsPrivateMode] = useState(false);

// 질문 ID별 랭킹 점수를 저장할 상태
const [questionRankings, setQuestionRankings] = useState<Record<string, number>>({});
Expand Down Expand Up @@ -209,7 +205,6 @@ function MentorLiveContent({ mentoringId, role, userId, userName }: { mentoringI
}

const timer = setTimeout(async () => {
setIsClustering(true);
setIsRanking(true);
try {
const QUESTION_SERVICE_URL = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:4003";
Expand Down Expand Up @@ -317,7 +312,6 @@ function MentorLiveContent({ mentoringId, role, userId, userName }: { mentoringI
} catch (error) {
console.error("🚨 [전체 실시간 연동 파이프라인 네트워크 크래시]:", error);
} finally {
setIsClustering(false);
setIsRanking(false);
}
}, 800); // 0.8초 디바운스 딜레이
Expand Down Expand Up @@ -591,17 +585,6 @@ function MentorLiveContent({ mentoringId, role, userId, userName }: { mentoringI
);
});

if (shouldControlMenteeConsumers) {
pausedQuestionUserIdRef.current = question.userId;
setIsPrivateMode(true);
const STT_SERVER_URL = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:4004";
fetch(`${STT_SERVER_URL}/audio/stt/session/${mentoringId}/private`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ isPrivate: true })
}).catch(e => console.error('[STT] 비공개 상태 설정 실패', e));
}

// API가 방금 응답해준 확실한 데이터를 바로 꺼내서 읽음
const questionText = question.content;

Expand Down Expand Up @@ -741,14 +724,6 @@ function MentorLiveContent({ mentoringId, role, userId, userName }: { mentoringI
setCompletedIds((prev) => [...prev, questionId]);
setQuestions((prev) => prev.filter(q => q.id !== questionId));

setIsPrivateMode(false);
const STT_SERVER_URL = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:4004";
fetch(`${STT_SERVER_URL}/audio/stt/session/${mentoringId}/private`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ isPrivate: false })
}).catch(e => console.error('[STT] 비공개 상태 초기화 실패', e));

console.log(`✅ [API 성공] 질문 상태가 COMPLETED로 변경됨:`, res.data);
} catch (err: any) {
console.error('❌ [API 실패] 질문 완료 처리 에러:', err.response?.data || err);
Expand Down