증거(진단)와 처방(할 일)을 한 페이지에 두면 스크롤이 너무 길어져
둘 다 읽기 힘들다는 지적에 따라 단계를 나눴다.
- /actions/:id 신규: Action Plan(P0~P2) + What We Don't Sell + 빌드 제안
(ActionPlanSection·IntegritySection 신규 컴포넌트, Tag는 두 페이지가
같이 써서 공용 컴포넌트로 뺌)
- /discovery/🆔 위 섹션 제거, 진단(점수·근거·Scorecard·Rubric)만 남김.
페이지 맨 아래 중복으로 박혀 있던 확인 항목 패널(ClinicInputsPanel)도
제거 — /supporters/:id 전용 단계가 이미 있어 두 번 보여줄 필요가 없었다
- 진단 데이터가 없는 병원이 /actions/:id 로 오면 /discovery/:id 로 되돌림
- ClinicNav: 5단계로 확장(진단 리포트→개선 제안→사이트 빌드→사진 확인→
확인 항목), 다음 단계 플로팅 버튼 추가(기존엔 이전 단계만 있었다)
- App.tsx: 라우트 전환 시 스크롤을 맨 위로 되돌림. 스크롤을 내린 채
다음 단계를 누르면 새 페이지가 같은 위치(짧으면 빈 하단)에서 시작하던
문제 수정. 인앱 해시 앵커(#breakdown)가 있으면 건드리지 않음
- 사이트 빌드/확인 항목 화면의 미리보기 버튼을 "초안 사이트 열기"로
통일(공개 후에는 "공개본 사이트 열기")
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
62 lines
3.4 KiB
TypeScript
62 lines
3.4 KiB
TypeScript
import { StrictMode } from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
import { BrowserRouter, Routes, Route } from 'react-router';
|
|
import App from './App.tsx';
|
|
import LandingPage from './pages/LandingPage.tsx';
|
|
import PricingPage from './pages/PricingPage.tsx';
|
|
import AnalysisLoadingPage from './pages/AnalysisLoadingPage.tsx';
|
|
import ReportPage from './pages/ReportPage.tsx';
|
|
import MarketingPlanPage from './pages/MarketingPlanPage.tsx';
|
|
import ContentStudioPage from './pages/ContentStudioPage.tsx';
|
|
import ChannelConnectPage from './pages/ChannelConnectPage.tsx';
|
|
import DistributionPage from './pages/DistributionPage.tsx';
|
|
import PerformancePage from './pages/PerformancePage.tsx';
|
|
import DataValidationPage from './pages/DataValidationPage.tsx';
|
|
import ClinicProfilePage from './pages/ClinicProfilePage.tsx';
|
|
import ApiDashboardPage from './pages/ApiDashboardPage.tsx';
|
|
import LoginPage from './pages/LoginPage.tsx';
|
|
import DiscoveryLandingPage from './pages/DiscoveryLandingPage.tsx';
|
|
import DiscoveryReportPage from './pages/DiscoveryReportPage.tsx';
|
|
import ActionPlanPage from './pages/ActionPlanPage.tsx';
|
|
import SupportersBuildPage from './pages/SupportersBuildPage.tsx';
|
|
import ImageReviewPage from './pages/ImageReviewPage.tsx';
|
|
import SiteBuildPage from './pages/SiteBuildPage.tsx';
|
|
import './index.css';
|
|
|
|
// 배포별 루트 페이지 분기. Vercel 프로젝트의 환경변수로 정한다.
|
|
const DISCOVERY_SITE = import.meta.env.VITE_SITE === 'discovery';
|
|
|
|
createRoot(document.getElementById('root')!).render(
|
|
<StrictMode>
|
|
<BrowserRouter>
|
|
<Routes>
|
|
<Route element={<App />}>
|
|
{/* 루트에서 무엇을 그릴지는 배포마다 다르다. VITE_SITE=discovery 로 빌드한 배포(webforai.kr)는
|
|
AI Discovery 랜딩을 루트에 놓고, 값이 없으면 지금까지처럼 INFINITH 랜딩을 놓는다.
|
|
한 코드베이스로 두 사이트를 내되 기존 배포의 동작은 바꾸지 않는다. */}
|
|
<Route index element={DISCOVERY_SITE ? <DiscoveryLandingPage /> : <LandingPage />} />
|
|
<Route path="pricing" element={<PricingPage />} />
|
|
<Route path="login" element={<LoginPage />} />
|
|
<Route path="report/loading" element={<AnalysisLoadingPage />} />
|
|
<Route path="report/loading/:reportId" element={<AnalysisLoadingPage />} />
|
|
<Route path="report/:id" element={<ReportPage />} />
|
|
<Route path="plan/:id" element={<MarketingPlanPage />} />
|
|
<Route path="studio/:id" element={<ContentStudioPage />} />
|
|
<Route path="channels" element={<ChannelConnectPage />} />
|
|
<Route path="distribute" element={<DistributionPage />} />
|
|
<Route path="performance" element={<PerformancePage />} />
|
|
<Route path="data-validation" element={<DataValidationPage />} />
|
|
<Route path="clinic/:id" element={<ClinicProfilePage />} />
|
|
<Route path="api-dashboard" element={<ApiDashboardPage />} />
|
|
<Route path="discovery" element={<DiscoveryLandingPage />} />
|
|
<Route path="discovery/:id" element={<DiscoveryReportPage />} />
|
|
<Route path="actions/:id" element={<ActionPlanPage />} />
|
|
<Route path="supporters/:id" element={<SupportersBuildPage />} />
|
|
<Route path="images/:id" element={<ImageReviewPage />} />
|
|
<Route path="build/:id" element={<SiteBuildPage />} />
|
|
</Route>
|
|
</Routes>
|
|
</BrowserRouter>
|
|
</StrictMode>,
|
|
);
|