- 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>
82 lines
4.5 KiB
TypeScript
82 lines
4.5 KiB
TypeScript
import { StrictMode } from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
import { BrowserRouter, Routes, Route, Navigate } 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 PrivacyPage from './pages/PrivacyPage.tsx';
|
|
import TermsPage from './pages/TermsPage.tsx';
|
|
import SampleReportPage from './pages/SampleReportPage.tsx';
|
|
import { DISCOVERY_SITE, SHOW_PRICING, SHOW_SAMPLE_REPORT } from './lib/site';
|
|
import './index.css';
|
|
|
|
|
|
createRoot(document.getElementById('root')!).render(
|
|
<StrictMode>
|
|
<BrowserRouter>
|
|
<Routes>
|
|
<Route element={<App />}>
|
|
{/* 배포마다 여는 화면이 다르다. VITE_SITE=discovery 로 빌드한 공개 배포(webforai.kr)는 AI Discovery 랜딩을
|
|
루트에 두고 공개 페이지(랜딩·로그인·약관)만 연다. 요금·예시 리포트는 src/lib/site.ts 스위치가 켜졌을 때만 연다.
|
|
실제 병원 진단 결과·내부 작업 화면 경로는 홈으로 돌린다.
|
|
값이 없으면 지금까지처럼 INFINITH 랜딩과 전체 화면을 연다. */}
|
|
{DISCOVERY_SITE ? (
|
|
<>
|
|
<Route index element={<DiscoveryLandingPage />} />
|
|
{SHOW_PRICING && <Route path="pricing" element={<PricingPage />} />}
|
|
{SHOW_SAMPLE_REPORT && <Route path="discovery/sample" element={<SampleReportPage />} />}
|
|
<Route path="login" element={<LoginPage />} />
|
|
<Route path="privacy" element={<PrivacyPage />} />
|
|
<Route path="terms" element={<TermsPage />} />
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</>
|
|
) : (
|
|
<>
|
|
<Route index element={<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/sample" element={<SampleReportPage />} />
|
|
<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 path="privacy" element={<PrivacyPage />} />
|
|
<Route path="terms" element={<TermsPage />} />
|
|
</>
|
|
)}
|
|
</Route>
|
|
</Routes>
|
|
</BrowserRouter>
|
|
</StrictMode>,
|
|
);
|