diff --git a/solution/site/src/app.test.tsx b/solution/site/src/app.test.tsx index 125bcf6..8a789fe 100644 --- a/solution/site/src/app.test.tsx +++ b/solution/site/src/app.test.tsx @@ -29,3 +29,12 @@ it('등록되지 않은 templateId면 렌더를 멈춘다', () => { expect(() => renderToStaticMarkup()).toThrow('등록되지 않은 템플릿'); expect(() => renderToStaticMarkup()).toThrow('등록되지 않은 템플릿'); }); + +it('첫 화면 문구가 따로 있어도 한 줄 요약이 화면에 나온다', () => { + for (const templateId of ['simple', 'paper']) { + const payload = withTemplate(templateId); + payload.narrative = {...payload.narrative, tagline: '첫 화면 문구', summary: '검색에 쓰는 한 줄 요약'}; + payload.facts = [...payload.facts, {...payload.facts[0], key: 'intro', label: '숙소 소개', value: '숙소 소개 원문입니다.', type: 'text'}]; + expect(renderToStaticMarkup()).toContain('검색에 쓰는 한 줄 요약'); + } +}); diff --git a/solution/site/src/sections/AboutSection.tsx b/solution/site/src/sections/AboutSection.tsx index 6be8a1a..ee6febf 100644 --- a/solution/site/src/sections/AboutSection.tsx +++ b/solution/site/src/sections/AboutSection.tsx @@ -46,6 +46,10 @@ export function AboutSection() { {title} + {/* 첫 화면이 다른 문구를 쓰면 한 줄 요약이 여기 말고는 화면에 없다. */} + {narrative.summary && (narrative.tagline || narrative.heroSubline) && ( +

{narrative.summary}

+ )}
{about.map((paragraph, index) => (

{paragraph}