- src/lib/site.ts 의 SHOW_PRICING·SHOW_SAMPLE_REPORT·SHOW_USE_CASES 로 라우트·헤더·랜딩 버튼을 한 곳에서 켜고 끈다. 공개 배포 기본값은 모두 꺼짐 - 리포트 본문을 DiscoveryReportView 로 분리하고, 가상 데이터만 그리는 /discovery/sample 을 만든다 - 예시 리포트 경로는 병원 작업 공간 메뉴 대신 일반 헤더를 쓴다 - Use Cases 데이터(src/data/useCases.ts, 비어 있음)와 섹션을 두고, 사례가 있을 때만 섹션·메뉴가 보인다 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
3.5 KiB
TypeScript
73 lines
3.5 KiB
TypeScript
/**
|
|
* /discovery — AI Discovery(AEO/GEO) 서비스 랜딩.
|
|
* 시안: docs/reports/landing/ai_discovery_landing.html (2026-08-31 확정)
|
|
*
|
|
* 데이터 원칙: 점수·등급·항목 %·항목 수는 전부
|
|
* scoreDiscovery(v1.0 실측) / scoreDiscoveryV2(v2.0 AEO·GEO) 계산값에서 파생한다.
|
|
* 재진단으로 데이터가 바뀌면 랜딩 수치도 함께 바뀐다 (JSX 하드코딩 금지).
|
|
*/
|
|
import { useMemo, useState } from 'react';
|
|
import { AEO_GEO_RUBRIC } from '../data/aeoGeoRubric';
|
|
import { DISCOVERY_SAMPLE } from '../data/discovery_sample';
|
|
import { scoreDiscovery, nextGradeTarget } from '../lib/discoveryScore';
|
|
import { AEO_GEO_RUBRIC_V2 } from '../data/aeoGeoRubricV2';
|
|
import { scoreDiscoveryV2 } from '../lib/discoveryScoreV2';
|
|
import type { AxisSummary } from '../components/discovery/AbmrLoop';
|
|
import DiscoveryHero from '../components/discovery/DiscoveryHero';
|
|
import WhyNow from '../components/discovery/WhyNow';
|
|
import HowItWorks from '../components/discovery/HowItWorks';
|
|
import SampleReport from '../components/discovery/SampleReport';
|
|
import Roadmap from '../components/discovery/Roadmap';
|
|
import HonestyStrip from '../components/discovery/HonestyStrip';
|
|
import DiscoveryCta from '../components/discovery/DiscoveryCta';
|
|
import ContactModal from '../components/ContactModal';
|
|
import UseCasesSection from '../components/discovery/UseCasesSection';
|
|
import { USE_CASES } from '../data/useCases';
|
|
import { SHOW_USE_CASES } from '../lib/site';
|
|
|
|
export default function DiscoveryLandingPage() {
|
|
// 진단 요청은 문의하기와 같은 폼(구글시트 기록 + 메일 알림)으로 받는다. source 로 어느 버튼에서 왔는지 남긴다.
|
|
const [leadSource, setLeadSource] = useState<string | null>(null);
|
|
// 공개 랜딩은 가상 예시 데이터만 쓴다. 실제 병원 진단 결과를 싣지 않는다.
|
|
const result = DISCOVERY_SAMPLE;
|
|
const overall = useMemo(() => scoreDiscovery(AEO_GEO_RUBRIC, result), [result]);
|
|
const overallV2 = useMemo(() => scoreDiscoveryV2(AEO_GEO_RUBRIC_V2, result), [result]);
|
|
const axes: AxisSummary[] = [overallV2.aeo, overallV2.geo].map((ax) => ({
|
|
code: ax.axis.code,
|
|
name: ax.axis.name,
|
|
nameEn: ax.axis.nameEn,
|
|
score: ax.score,
|
|
grade: ax.grade,
|
|
target: nextGradeTarget(ax.score),
|
|
items: ax.items.map((it) => ({ id: it.item.id, name: it.item.name, pct: it.pct === null ? null : Math.round(it.pct * 100) })),
|
|
}));
|
|
|
|
const criteriaCount = AEO_GEO_RUBRIC.criteria.length;
|
|
const categoryCount = AEO_GEO_RUBRIC.categories.length;
|
|
const verifiedCount = overall.categories.reduce((sum, c) => sum + c.verifiedCount, 0);
|
|
const unverifiedCount = criteriaCount - verifiedCount;
|
|
|
|
return (
|
|
<div className="[word-break:keep-all]">
|
|
<DiscoveryHero
|
|
axes={axes}
|
|
clinicName={result.clinicName}
|
|
criteriaCount={criteriaCount}
|
|
onStart={() => setLeadSource('discovery_hero')}
|
|
/>
|
|
<WhyNow />
|
|
<HowItWorks criteriaCount={criteriaCount} categoryCount={categoryCount} />
|
|
<SampleReport overall={overall} axes={axes} result={result} />
|
|
{SHOW_USE_CASES && USE_CASES.length > 0 && <UseCasesSection cases={USE_CASES} />}
|
|
<Roadmap
|
|
axes={axes}
|
|
criteriaCount={criteriaCount}
|
|
unverifiedCount={unverifiedCount}
|
|
/>
|
|
<HonestyStrip />
|
|
<DiscoveryCta criteriaCount={criteriaCount} onStart={() => setLeadSource('discovery_cta')} />
|
|
<ContactModal open={leadSource !== null} onClose={() => setLeadSource(null)} source={leadSource ?? 'discovery'} />
|
|
</div>
|
|
);
|
|
}
|