0114 요청사항 수정 .

main
hbyang 2026-01-14 14:33:54 +09:00
parent d94dc76ccf
commit 34ea32319c
2 changed files with 10 additions and 25 deletions

View File

@ -1,5 +1,5 @@
import React, { useState } from 'react';
import React from 'react';
import { CrawlingResponse } from '../../types/api';
interface AnalysisResultSectionProps {
@ -88,7 +88,6 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
const { processed_info, marketing_analysis } = data;
const tags = marketing_analysis.tags || [];
const facilities = marketing_analysis.facilities || [];
const [showFullReport, setShowFullReport] = useState(false);
const reportSections = parseReport(marketing_analysis.report);
return (
@ -132,12 +131,6 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
{/* Marketing Analysis Summary */}
<div className="report-section">
<button
onClick={() => setShowFullReport(!showFullReport)}
className="report-toggle"
>
{showFullReport ? '간략히 보기' : '자세히 보기'}
</button>
<div className="report-content custom-scrollbar">
{reportSections.length === 0 ? (
<div>
@ -145,7 +138,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
? formatReportText(marketing_analysis.report)
: '분석 결과가 없습니다.'}
</div>
) : showFullReport ? (
) : (
<div className="report-sections">
{reportSections.map((section, idx) => (
<div key={idx}>
@ -156,14 +149,6 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
</div>
))}
</div>
) : (
<div>
{formatReportText(
reportSections[0]?.content.length > 150
? `${reportSections[0].content.slice(0, 150)}...`
: reportSections[0]?.content || ''
)}
</div>
)}
</div>
</div>

View File

@ -113,7 +113,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
setShowLyrics(true);
}
setStatus('polling');
setStatusMessage('작곡을 생성하고 있습니다... (새로고침 후 복구됨)');
setStatusMessage('노래를 생성하고 있습니다... (새로고침 후 복구됨)');
resumePolling(savedState.taskId, savedState.sunoTaskId, savedState.lyrics, 0);
}
}, []);
@ -153,9 +153,9 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
sunoTaskId,
(pollStatus: string) => {
if (pollStatus === 'pending') {
setStatusMessage('작곡을 생성하고 있습니다...');
setStatusMessage('노래를 생성하고 있습니다...');
} else if (pollStatus === 'processing') {
setStatusMessage('작곡을 생성하고 있습니다...');
setStatusMessage('노래를 생성하고 있습니다...');
}
}
);
@ -329,7 +329,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
setStatus('generating_lyric');
setErrorMessage(null);
setStatusMessage('사를 생성하고 있습니다...');
setStatusMessage('사를 생성하고 있습니다...');
try {
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
@ -348,12 +348,12 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
}
// 2. 가사 생성 상태 폴링 → 완료 시 상세 조회
setStatusMessage('사를 생성하고 있습니다...');
setStatusMessage('사를 생성하고 있습니다...');
const lyricDetailResponse = await waitForLyricComplete(
lyricResponse.task_id,
(status: string) => {
if (status === 'processing') {
setStatusMessage('사를 생성하고 있습니다...');
setStatusMessage('사를 생성하고 있습니다...');
}
}
);
@ -371,7 +371,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
setShowLyrics(true);
setStatus('generating_song');
setStatusMessage('작곡을 생성하고 있습니다...');
setStatusMessage('노래를 생성하고 있습니다...');
const genreMap: Record<string, string> = {
'자동 선택': 'pop',
@ -395,7 +395,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
}
setStatus('polling');
setStatusMessage('작곡을 생성하고 있습니다...');
setStatusMessage('노래를 생성하고 있습니다...');
saveToStorage(songResponse.task_id, songResponse.suno_task_id, lyricDetailResponse.lyric_result, 'polling');
await resumePolling(songResponse.task_id, songResponse.suno_task_id, lyricDetailResponse.lyric_result, 0);