- 랜딩 샘플 리포트·AI 답변 예시·문의 서식 예시를 가상 A성형외과로 바꾼다 (discovery_sample, 고정 시드 무작위 판정) - VITE_SITE=discovery 배포는 랜딩·요금·로그인·약관만 연다. 실제 병원 진단 결과와 내부 화면 경로는 홈으로 돌린다 - src/data·src/services 를 부수효과 없는 모듈로 표시해 쓰지 않는 실제 병원 목업이 공개 번들에서 빠지게 한다 - 공개 배포 번들에 GEMINI_API_KEY 를 넣지 않는다 - 헤더 Product·Use Cases 는 공개 배포에서 숨기고, 푸터에 개인정보처리방침·이용약관 페이지를 연결한다 - 기준표 설명의 실제 병원 예시 문구를 일반 예시로 바꾼다 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
1.9 KiB
TypeScript
62 lines
1.9 KiB
TypeScript
/**
|
|
* LegalLayout: 개인정보처리방침·이용약관 공통 틀.
|
|
* 조항은 { title, body } 배열로 받고, body 의 각 줄은 문단 또는 목록 항목으로 그린다.
|
|
* '- ' 로 시작하는 줄은 목록 항목이다.
|
|
*/
|
|
import type { ReactNode } from 'react';
|
|
|
|
export interface LegalSection {
|
|
title: string;
|
|
body: (string | ReactNode)[];
|
|
}
|
|
|
|
interface LegalLayoutProps {
|
|
title: string;
|
|
intro: string;
|
|
effectiveDate: string;
|
|
sections: LegalSection[];
|
|
}
|
|
|
|
function renderBody(body: LegalSection['body']) {
|
|
const out: ReactNode[] = [];
|
|
let list: ReactNode[] = [];
|
|
const flush = () => {
|
|
if (list.length) {
|
|
out.push(<ul key={`ul-${out.length}`} className="list-disc pl-5 space-y-1.5">{list}</ul>);
|
|
list = [];
|
|
}
|
|
};
|
|
body.forEach((line, i) => {
|
|
if (typeof line === 'string' && line.startsWith('- ')) {
|
|
list.push(<li key={i}>{line.slice(2)}</li>);
|
|
return;
|
|
}
|
|
flush();
|
|
out.push(<p key={i}>{line}</p>);
|
|
});
|
|
flush();
|
|
return out;
|
|
}
|
|
|
|
export default function LegalLayout({ title, intro, effectiveDate, sections }: LegalLayoutProps) {
|
|
return (
|
|
<section className="min-h-screen pt-32 pb-24 px-6 bg-white [word-break:keep-all]">
|
|
<div className="max-w-3xl mx-auto">
|
|
<h1 className="font-serif text-3xl md:text-4xl font-bold text-primary-900 mb-4">{title}</h1>
|
|
<p className="text-[15px] leading-[1.8] text-slate-600 mb-3">{intro}</p>
|
|
<p className="text-sm text-slate-400 mb-12">시행일 {effectiveDate}</p>
|
|
<div className="flex flex-col gap-10">
|
|
{sections.map((s, i) => (
|
|
<div key={s.title}>
|
|
<h2 className="text-lg font-bold text-primary-900 mb-3">
|
|
제{i + 1}조 {s.title}
|
|
</h2>
|
|
<div className="flex flex-col gap-2.5 text-[15px] leading-[1.8] text-slate-600">{renderBody(s.body)}</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|