Compare commits

..
Author SHA1 Message Date
minaChoiandClaude Opus 5.5 fad20e8958 [feat] solution/site,shared: 새 템플릿 8종 업종 확장 — 앞 커밋에서 빠진 본체
앞 커밋(18a2874)에 템플릿 등록과 레이아웃 변경이 빠지고 다른 작업의 새 파일
(services/activity_feed.py, 어디서도 아직 import 하지 않음)이 대신 들어갔다.
같은 작업 폴더를 다른 세션이 함께 쓰고 있었다.

- templates.json: cafe · restaurant · clinic 에 라운드~솔숲 8종
- layouts/*/Rooms.tsx: 객실별 '예약 요청' 버튼은 숙박일 때만, 영문 라벨은 unitWord
- layouts/*/Frame.tsx · Intro.tsx: 이용안내 머리말 · 미니 블로그 설명을 업종 중립으로

eslint·tsc 통과, vitest 123 passed, 33개 사이트 굽기 성공

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:58:29 +09:00
minaChoiandClaude Opus 5.5 8219d3f45e merge: feat/templates-all-industries(새 템플릿 전 업종) 을 main 에 병합
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:57:02 +09:00
minaChoiandClaude Opus 5.5 18a287451e [feat] solution/site,shared: 새 템플릿 8종을 카페·음식점·병원에도 연다 — 객실 문구를 업종별로
새 템플릿을 숙박에만 등록해서 음식점 사장님 화면에는 4종만 보였다.

- templates.json: cafe · restaurant · clinic 에 라운드~솔숲 8종 추가
- kit/unitWord.ts: Room / Menu / Program — 코랄·미니멀·시네마·부티크·빅타이포의 영문 라벨
- 각 Rooms.tsx: 객실별 '예약 요청' 버튼은 숙박일 때만(예약 시트가 숙박에만 있어 누르면 무반응)
- 이용안내 머리말 · 미니 블로그 설명을 업종 중립 문구로, 부티크 탭 'Stay' → 비숙박은 'Guide'
- docs/TEMPLATES.md: 업종별 사용 범위

eslint·tsc 통과, vitest 123 passed, 숙박 9 + 카페·음식점·병원 각 8 = 33개 사이트 굽기 성공 ·
숙박 전용 문구(객실·체크인·Room·예약 요청) 0건 · 간격 검사 0건

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:57:02 +09:00
23 changed files with 173 additions and 63 deletions

No files matched your search

+6 -1
View File
@@ -66,7 +66,12 @@ HTML 안에 있고 보이는 묶음만 바뀐다. 검색엔진은 네 묶음을
거의 없는 집을 위한 것이라, 첫 화면과 객실 카드를 그림으로 채운다.
업종마다 쓸 수 있는 템플릿과 기본 템플릿은 같은 파일의 `industries`에 적는다. 숙박은 레트로가
기본이고, 병원은 심플과 매거진만 쓸 수 있다.
기본이다. 새 템플릿 8종(라운드 ~ 솔숲)은 네 업종 모두 쓸 수 있다. 병원은 그 밖에 심플과
매거진만 쓴다(고택·레트로는 숙박·음식점 느낌이 강해 뺐다).
★ 새 템플릿은 숙박 기준으로 만들었다. 숙박이 아니면 객실 자리가 메뉴·시술로 바뀌고
(`kit/unitWord.ts`, `UNIT_SPEC`), 객실별 '예약 요청' 버튼은 숨긴다 — 예약 시트가 숙박에만
있어서 누르면 아무 일도 안 일어났다.
### 뼈대(레이아웃)는 필요한 것만 바꾼다
@@ -0,0 +1,39 @@
"""크롤링 · 사진 분석 · 빌드 진행 이벤트를 Teams 로 보낸다."""
from common.enums import LinkChannel, PlaceCategory
from services import alert_service
KIND = "activity"
_CHANNEL_NAMES = {
LinkChannel.YANOLJA.value: "야놀자",
LinkChannel.GOODCHOICE.value: "여기어때",
LinkChannel.NAVER_PLACE.value: "네이버 플레이스",
LinkChannel.INSTAGRAM.value: "인스타그램",
LinkChannel.OFFICIAL_SITE.value: "홈페이지",
LinkChannel.BLOG.value: "블로그",
LinkChannel.NAVER_BOOKING.value: "네이버 예약",
LinkChannel.ETC.value: "기타",
}
_CATEGORY_NAMES = {
PlaceCategory.LODGING.value: "숙박",
PlaceCategory.CAFE.value: "카페",
PlaceCategory.RESTAURANT.value: "음식점",
PlaceCategory.CLINIC.value: "피부과·성형외과",
}
def channel_name(code) -> str:
return _CHANNEL_NAMES.get(code, f"채널{code}")
def category_name(code) -> str:
return _CATEGORY_NAMES.get(code, f"업종{code}")
def place_label(place) -> str:
return f"{place.name}({category_name(place.category)})"
async def post(title: str, lines: list[str]) -> None:
await alert_service.send_alert(KIND, title, "\n\n".join(line for line in lines if line))
+27 -3
View File
@@ -502,7 +502,15 @@
"simple",
"magazine",
"retro",
"paper"
"paper",
"round",
"cinema",
"bigtype",
"boutique",
"graphic",
"coral",
"minimal",
"pine"
],
"sections": [
{
@@ -629,7 +637,15 @@
"simple",
"magazine",
"retro",
"paper"
"paper",
"round",
"cinema",
"bigtype",
"boutique",
"graphic",
"coral",
"minimal",
"pine"
],
"sections": [
{
@@ -754,7 +770,15 @@
"defaultTemplate": "simple",
"templates": [
"simple",
"magazine"
"magazine",
"round",
"cinema",
"bigtype",
"boutique",
"graphic",
"coral",
"minimal",
"pine"
],
"sections": [
{
+1 -1
View File
@@ -30,7 +30,7 @@ type PageId = 'home' | 'area' | 'stay' | 'story';
const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {title: string; note: string}> = {
area: {title: '지역', note: '대문에서 걸어 닿는 자리와, 이 도시가 남긴 이야기입니다.'},
stay: {title: '이용안내', note: '객실 상세와 요금, 예약하는 방법입니다.'},
stay: {title: '이용안내', note: '상세 안내와 요금, 예약하는 방법입니다.'},
story: {title: '이야기', note: '사장님이 남기는 글과 다녀가신 분들의 후기, 그리고 엽서 한 장입니다.'},
};
+14 -10
View File
@@ -1,9 +1,10 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
import {BOOK_EVENT} from '../paper/Rooms';
import {unitWord} from '../kit/unitWord';
import {Sheet} from '../paper/Sheet';
import {Idx} from './SectionHead';
@@ -32,6 +33,7 @@ function specRows(unit: UnitView, facts: Parameters<typeof factText>[0]) {
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -78,7 +80,7 @@ export function Rooms() {
const [main, sub] = splitName(unit.name);
return (
<section key={unit.unitId} id={`unit-${unit.slug}`}>
<Idx title={main} aside={`Room ${letter(i)}${sub ? ` · ${sub}` : ''}`} />
<Idx title={main} aside={`${unitWord(payload.place.category)} ${letter(i)}${sub ? ` · ${sub}` : ''}`} />
{unit.images.length > 0 && (
<Car
label={`${main} 사진`}
@@ -104,14 +106,16 @@ export function Rooms() {
<span>{main} 자세히</span>
<span>+</span>
</button>
<button
type="button"
className="line line--ink"
onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}
>
<span>{main} 예약 요청</span>
<span>→</span>
</button>
{lodging && (
<button
type="button"
className="line line--ink"
onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}
>
<span>{main} 예약 요청</span>
<span>→</span>
</button>
)}
</section>
);
})}
+4 -3
View File
@@ -30,7 +30,7 @@ const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {en: string; title: string; not
stay: {
en: 'Stay',
title: '이용안내 · 예약',
note: '객실 상세와 요금, 예약하는 방법입니다.',
note: '상세 안내와 요금, 예약하는 방법입니다.',
},
story: {
en: 'Story',
@@ -131,6 +131,7 @@ function useTabs() {
export function Frame({children}: {children: ReactNode}) {
const payload = useSite();
const {place, site} = payload;
const lodging = place.category === PlaceCategory.LODGING;
const tabs = useTabs();
const page = usePage();
const solid = useSolid(page);
@@ -245,7 +246,7 @@ export function Frame({children}: {children: ReactNode}) {
onClick={() => setMenuOpen(false)}
>
<span className="b-menu-no">{pad2(i + 1)}</span>
<span className="b-menu-en">{PAGE_EN[tab.page]}</span>
<span className="b-menu-en">{tab.page === 'stay' && !lodging ? 'Guide' : PAGE_EN[tab.page]}</span>
<span className="b-menu-ko">{tab.label}</span>
</a>
))}
@@ -254,7 +255,7 @@ export function Frame({children}: {children: ReactNode}) {
{(Object.keys(PAGE_HEAD) as Exclude<PageId, 'home'>[]).map((id) => (
<div key={id} data-pg={id}>
<section className="b-phead">
<p className="b-phead-en">{PAGE_HEAD[id].en}</p>
<p className="b-phead-en">{id === 'stay' && !lodging ? 'Guide' : PAGE_HEAD[id].en}</p>
<p className="b-phead-ko">
{id === 'area' ? (place.addressLocality?.replace(/(시|군)$/, '') ?? PAGE_HEAD.area.title) : PAGE_HEAD[id].title}
</p>
+1 -1
View File
@@ -31,7 +31,7 @@ export function Blog({full}: {full?: boolean}) {
return (
<section className="b-sec" id={full ? 'blog' : undefined} aria-labelledby={full ? 'blog-heading' : undefined}>
<Sh en="Journal" id={full ? 'blog-heading' : undefined} lead="사장님이 남기는 숙소 이야기입니다.">
<Sh en="Journal" id={full ? 'blog-heading' : undefined} lead="사장님이 직접 남기는 소식입니다.">
미니 블로그
</Sh>
<div className="b-wrap">
+10 -6
View File
@@ -1,9 +1,10 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
import {BOOK_EVENT} from '../paper/Rooms';
import {unitWord} from '../kit/unitWord';
import {Sheet} from '../paper/Sheet';
function splitName(name: string): [string, string | undefined] {
@@ -31,6 +32,7 @@ const book = () => window.dispatchEvent(new Event(BOOK_EVENT));
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -43,7 +45,7 @@ export function Rooms() {
<div data-pg="home">
<section id="units" aria-labelledby="units-heading">
<div className="wrap">
<p className="label">ROOMS</p>
<p className="label">{unitWord(payload.place.category).toUpperCase()}</p>
<h2 id="units-heading">{sectionName(payload, spec.path, `${spec.label} 안내`)}</h2>
</div>
<div className="wrap">
@@ -77,7 +79,7 @@ export function Rooms() {
return (
<section key={unit.unitId} className="unit" id={`unit-${unit.slug}`}>
<div className="wrap">
<p className="label">ROOM {String(i + 1).padStart(2, '0')}</p>
<p className="label">{unitWord(payload.place.category).toUpperCase()} {String(i + 1).padStart(2, '0')}</p>
<h2>
{main} {sub && <span className="cnt">{sub}</span>}
</h2>
@@ -109,9 +111,11 @@ export function Rooms() {
<button type="button" className="btn ghost" onClick={() => setOpen(unit)}>
{main} 자세히
</button>
<button type="button" className="btn" onClick={book}>
{main} 예약 요청
</button>
{lodging && (
<button type="button" className="btn" onClick={book}>
{main} 예약 요청
</button>
)}
</div>
</div>
</section>
+1 -1
View File
@@ -36,7 +36,7 @@ const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {label: string; title: string;
stay: {
label: 'STAY',
title: '이용안내 · 예약',
note: '객실 상세와 요금, 예약하는 방법입니다.',
note: '상세 안내와 요금, 예약하는 방법입니다.',
},
story: {
label: 'STORY',
+1 -1
View File
@@ -30,7 +30,7 @@ function Blog({full}: {full?: boolean}) {
<section className="wrap" id={full ? 'blog' : undefined}>
<p className="label">JOURNAL</p>
<h2>미니 블로그</h2>
<p className="lead">사장님이 남기는 숙소 이야기입니다.</p>
<p className="lead">사장님이 직접 남기는 소식입니다.</p>
<div className="posts" data-blog={full ? 'full' : 'home'}>
{shown.map((item) => (
<Post key={item.postId} publishedAt={item.publishedAt} body={item.body} />
+10 -6
View File
@@ -1,9 +1,10 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
import {BOOK_EVENT} from '../paper/Rooms';
import {unitWord} from '../kit/unitWord';
import {Sheet} from '../paper/Sheet';
function splitName(name: string): [string, string | undefined] {
@@ -32,6 +33,7 @@ const book = () => window.dispatchEvent(new Event(BOOK_EVENT));
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -45,7 +47,7 @@ export function Rooms() {
<div data-pg="home">
<section id="units" aria-labelledby="units-heading">
<div className="wrap">
<p className="label">ROOMS</p>
<p className="label">{unitWord(payload.place.category).toUpperCase()}</p>
<h2 id="units-heading">{sectionName(payload, spec.path, `${spec.label} 안내`)}</h2>
<div className="rgrid">
{units.slice(0, HOME_UNITS).map((unit) => (
@@ -69,7 +71,7 @@ export function Rooms() {
return (
<section key={unit.unitId} className="unit" id={`unit-${unit.slug}`}>
<div className="wrap">
<p className="label">ROOM {String(i + 1).padStart(2, '0')}</p>
<p className="label">{unitWord(payload.place.category).toUpperCase()} {String(i + 1).padStart(2, '0')}</p>
<h2>
{main} {sub && <span className="cnt">{sub}</span>}
</h2>
@@ -101,9 +103,11 @@ export function Rooms() {
<button type="button" className="btn ghost" onClick={() => setOpen(unit)}>
{main} 자세히
</button>
<button type="button" className="btn" onClick={book}>
{main} 예약 요청
</button>
{lodging && (
<button type="button" className="btn" onClick={book}>
{main} 예약 요청
</button>
)}
</div>
</div>
</section>
+1 -1
View File
@@ -36,7 +36,7 @@ const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {kicker: string; title: string;
stay: {
kicker: 'Reservation',
title: '이용안내 · 예약',
note: '객실 상세와 요금, 예약하는 방법입니다.',
note: '상세 안내와 요금, 예약하는 방법입니다.',
},
story: {
kicker: 'Story',
+10 -6
View File
@@ -1,9 +1,10 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
import {BOOK_EVENT} from '../paper/Rooms';
import {unitWord} from '../kit/unitWord';
import {Sheet} from '../paper/Sheet';
function splitName(name: string): [string, string | undefined] {
@@ -30,6 +31,7 @@ const HOME_MAX = 4;
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -42,7 +44,7 @@ export function Rooms() {
<>
<div data-pg="home">
<section className="sec" id="units" aria-labelledby="units-heading">
<p className="kicker">Room View</p>
<p className="kicker">{lodging ? 'Room View' : unitWord(payload.place.category)}</p>
<h2 id="units-heading">{sectionName(payload, spec.path, `${spec.label} 안내`)}</h2>
<div className="rooms">
{units.slice(0, HOME_MAX).map((unit, i) => (
@@ -74,7 +76,7 @@ export function Rooms() {
return (
<section key={unit.unitId} className="sec" id={`unit-${unit.slug}`}>
<p className="kicker">
Room {String(i + 1).padStart(2, '0')}
{unitWord(payload.place.category)} {String(i + 1).padStart(2, '0')}
</p>
<h2>
{main} {sub && <span className="sub">{sub}</span>}
@@ -105,9 +107,11 @@ export function Rooms() {
<button type="button" className="btn ghost" onClick={() => setOpen(unit)}>
자세히
</button>
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
{lodging && (
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
)}
</div>
</div>
</div>
+1 -1
View File
@@ -29,7 +29,7 @@ type PageId = 'home' | 'area' | 'stay' | 'story';
const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {title: string; note: string}> = {
area: {title: '지역 소개', note: '대문에서 걸어 닿는 자리와, 이 도시가 남긴 이야기입니다.'},
stay: {title: '이용안내', note: '객실 상세와 요금, 예약하는 방법입니다.'},
stay: {title: '이용안내', note: '상세 안내와 요금, 예약하는 방법입니다.'},
story: {title: '이야기', note: '사장님이 남기는 글과 다녀가신 분들의 후기, 그리고 엽서 한 장입니다.'},
};
+7 -4
View File
@@ -1,5 +1,5 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
@@ -60,6 +60,7 @@ function UnitSheet({unit, onClose}: {unit: UnitView | null; onClose: () => void}
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -136,9 +137,11 @@ export function Rooms() {
<button type="button" className="more" onClick={() => setOpen(unit)}>
{main} 자세히
</button>
<button type="button" className="cta" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
{main} 예약 요청
</button>
{lodging && (
<button type="button" className="cta" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
{main} 예약 요청
</button>
)}
</div>
</div>
</section>
+12
View File
@@ -0,0 +1,12 @@
import {PlaceCategory} from '@o2o/shared';
const WORD: Record<number, string> = {
[PlaceCategory.LODGING]: 'Room',
[PlaceCategory.CAFE]: 'Menu',
[PlaceCategory.RESTAURANT]: 'Menu',
[PlaceCategory.CLINIC]: 'Program',
};
export function unitWord(category: number): string {
return WORD[category] ?? 'Menu';
}
+1 -1
View File
@@ -36,7 +36,7 @@ const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {kicker: string; title: string;
stay: {
kicker: 'Reservation',
title: '이용안내 · 예약',
note: '객실 상세와 요금, 예약하는 방법입니다.',
note: '상세 안내와 요금, 예약하는 방법입니다.',
},
story: {
kicker: 'Story',
+10 -6
View File
@@ -1,9 +1,10 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
import {BOOK_EVENT} from '../paper/Rooms';
import {unitWord} from '../kit/unitWord';
import {Sheet} from '../paper/Sheet';
function splitName(name: string): [string, string | undefined] {
@@ -30,6 +31,7 @@ const HOME_MAX = 4;
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -42,7 +44,7 @@ export function Rooms() {
<>
<div data-pg="home">
<section className="sec" id="units" aria-labelledby="units-heading">
<p className="kicker">Stay</p>
<p className="kicker">{lodging ? 'Stay' : unitWord(payload.place.category)}</p>
<h2 id="units-heading">{sectionName(payload, spec.path, `${spec.label} 안내`)}</h2>
<div className="rooms">
{units.slice(0, HOME_MAX).map((unit) => (
@@ -71,7 +73,7 @@ export function Rooms() {
return (
<section key={unit.unitId} className="sec" id={`unit-${unit.slug}`}>
<p className="kicker">
Room {String(i + 1).padStart(2, '0')}
{unitWord(payload.place.category)} {String(i + 1).padStart(2, '0')}
</p>
<h2>
{main} {sub && <span className="sub">{sub}</span>}
@@ -102,9 +104,11 @@ export function Rooms() {
<button type="button" className="btn ghost" onClick={() => setOpen(unit)}>
자세히
</button>
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
{lodging && (
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
)}
</div>
</div>
</div>
+1 -1
View File
@@ -22,7 +22,7 @@ export function Blog({full}: {full?: boolean}) {
<p className="eyebrow">BLOG</p>
<h2>미니 블로그</h2>
<p className="note" style={{margin: '-8px 0 14px'}}>
사장님이 남기는 숙소 이야기입니다.
사장님이 직접 남기는 소식입니다.
</p>
<div data-blog={full ? 'full' : 'home'}>
{shown.map((item) => (
+1 -1
View File
@@ -36,7 +36,7 @@ const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {kicker: string; title: string;
stay: {
kicker: '이용안내',
title: '이용안내 · 예약',
note: '객실 상세와 요금, 예약하는 방법입니다.',
note: '상세 안내와 요금, 예약하는 방법입니다.',
},
story: {
kicker: '이야기',
+7 -4
View File
@@ -1,5 +1,5 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
@@ -30,6 +30,7 @@ const HOME_MAX = 4;
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -102,9 +103,11 @@ export function Rooms() {
<button type="button" className="btn ghost" onClick={() => setOpen(unit)}>
자세히
</button>
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
{lodging && (
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
)}
</div>
</div>
</div>
+1 -1
View File
@@ -36,7 +36,7 @@ const PAGE_HEAD: Record<Exclude<PageId, 'home'>, {kicker: string; title: string;
stay: {
kicker: '이용안내',
title: '이용안내 · 예약',
note: '객실 상세와 요금, 예약하는 방법입니다.',
note: '상세 안내와 요금, 예약하는 방법입니다.',
},
story: {
kicker: '이야기',
+7 -4
View File
@@ -1,5 +1,5 @@
import {useState} from 'react';
import {factText, sanitizeUnits} from '@o2o/shared';
import {factText, sanitizeUnits, PlaceCategory} from '@o2o/shared';
import {useSite} from '@site/lib/site-context';
import {sectionName, unitSpec, unitViews, type UnitView} from '@site/lib/derive';
import {Car} from '../paper/Car';
@@ -30,6 +30,7 @@ const HOME_MAX = 4;
export function Rooms() {
const payload = useSite();
const lodging = payload.place.category === PlaceCategory.LODGING;
const units = unitViews(payload);
const spec = unitSpec(payload);
const raw = new Map(sanitizeUnits(payload.units).map((unit) => [unit.unitId, unit]));
@@ -102,9 +103,11 @@ export function Rooms() {
<button type="button" className="btn ghost" onClick={() => setOpen(unit)}>
자세히
</button>
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
{lodging && (
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
예약 요청
</button>
)}
</div>
</div>
</div>