fix: naverBlog RSS 전환 + naverPlace DB-first 패턴 + 핵심문제진단 JSON 렌더링 버그 수정
- collect-channel-data: naverBlog 실시간 검색 제거 → verified handle 기반 RSS 직접 fetch
- collect-channel-data: naverPlace DB-first 패턴 (verified_channels에 저장된 데이터 우선 사용, 없을 때만 URL도메인 매칭 검색 후 DB에 저장)
- transformReport: ch.issues 배열 항목이 {issue, severity} 객체일 때 JSON.stringify 대신 .issue 문자열 추출
- ProblemDiagnosis: Lucide 아이콘 제거 → FilledIcons(ShieldFilled, FileTextFilled, LinkExternalFilled), 항목 구분자 ' ' → ' — '
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
5ed35bc4cd
commit
c0c37b84de
3 files changed
+115
-96
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { ShieldAlert, Layers, Link2 } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { ShieldFilled, FileTextFilled, LinkExternalFilled } from '../icons/FilledIcons';
|
||||
import type { DiagnosisItem } from '../../types/report';
|
||||
|
||||
interface ProblemDiagnosisProps {
|
||||
@@ -13,7 +13,7 @@ interface ProblemDiagnosisProps {
|
||||
* into the key strategic buckets that the reference design shows.
|
||||
*/
|
||||
function clusterDiagnosis(items: DiagnosisItem[]): {
|
||||
icon: typeof ShieldAlert;
|
||||
icon: typeof ShieldFilled;
|
||||
title: string;
|
||||
detail: string;
|
||||
}[] {
|
||||
@@ -64,27 +64,27 @@ function clusterDiagnosis(items: DiagnosisItem[]): {
|
||||
|
||||
return [
|
||||
{
|
||||
icon: ShieldAlert,
|
||||
icon: ShieldFilled,
|
||||
title: '브랜드 아이덴티티 파편화',
|
||||
detail:
|
||||
brandItems.length > 0
|
||||
? brandItems.slice(0, 3).join(' ')
|
||||
? brandItems.slice(0, 3).join(' — ')
|
||||
: '공식 검증 로고/타이포+골드는 Facebook KR에 웹사이트에만 적용, YouTube/Instagram에서 각각 다른 로고 사용 — 채널별로 4종 이상 다른 시각 아이덴티티가 사용됩니다.',
|
||||
},
|
||||
{
|
||||
icon: Layers,
|
||||
icon: FileTextFilled,
|
||||
title: '콘텐츠 전략 부재',
|
||||
detail:
|
||||
contentItems.length > 0
|
||||
? contentItems.slice(0, 3).join(' ')
|
||||
? contentItems.slice(0, 3).join(' — ')
|
||||
: '콘텐츠 캘린더가 없음, 콘텐츠 기/가이드 없음, KR+EN 시장 타겟 전략 없음. YouTube→Instagram 크로스 포스팅 부재.',
|
||||
},
|
||||
{
|
||||
icon: Link2,
|
||||
icon: LinkExternalFilled,
|
||||
title: '플랫폼 간 유입 단절',
|
||||
detail:
|
||||
funnelItems.length > 0
|
||||
? funnelItems.slice(0, 3).join(' ')
|
||||
? funnelItems.slice(0, 3).join(' — ')
|
||||
: 'YouTube 10만+ → Instagram 1.4K 전환 실패, 웹사이트에서 SNS 유입 3% 미만, 상담전환 동선 부재.',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -138,7 +138,7 @@ function buildDiagnosis(report: ApiReport): DiagnosisItem[] {
|
||||
// AI-generated per-channel diagnosis array (new format)
|
||||
if (ch.diagnosis) {
|
||||
for (const d of ch.diagnosis) {
|
||||
const issue = typeof d.issue === 'string' ? d.issue : typeof d === 'string' ? d : JSON.stringify(d.issue ?? d);
|
||||
const issue = typeof d === 'string' ? d : typeof d.issue === 'string' ? d.issue : null;
|
||||
if (issue) {
|
||||
const rec = typeof d.recommendation === 'string' ? d.recommendation : '';
|
||||
items.push({
|
||||
@@ -159,7 +159,15 @@ function buildDiagnosis(report: ApiReport): DiagnosisItem[] {
|
||||
}
|
||||
if (ch.issues) {
|
||||
for (const issue of ch.issues) {
|
||||
items.push({ category: channel, detail: typeof issue === 'string' ? issue : JSON.stringify(issue), severity: 'warning' });
|
||||
const issueObj = issue as Record<string, unknown>;
|
||||
const detail = typeof issue === 'string'
|
||||
? issue
|
||||
: typeof issueObj.issue === 'string'
|
||||
? issueObj.issue
|
||||
: null;
|
||||
if (detail) {
|
||||
items.push({ category: channel, detail, severity: (issueObj.severity as Severity) || 'warning' });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user