[fix] solution/frontend: 뒤로가기 후 재검색이 옛 사업장을 되살림 — placeId URL 우선순위 정정
주소창의 placeId 가 store 보다 우선이라(BuilderPage.tsx), 뒤로가기로 검색 단계에 돌아와도 그 placeId 가 그대로 남아 있으면 usePlaceSync 가 옛 사업장을 다시 확정 정보로 채워 넣었다 — 다른 상호로 재검색해도 이전 확정 화면이 그대로 떴다. - BuilderPage.tsx: step === 'search' 일 땐 주소창 placeId 를 안 쓴다 - Step2PlaceSearch.tsx: 뒤로가기 가드가 store 뿐 아니라 주소창 placeId·flow 도 지운다 [feat] solution/frontend: "고택" 템플릿 — 숙박·요식업·카페 공용, stay2 목업 색·서체 이식 industryData.ts 에 LOOK.paper(크림 종이·가는 명조·그림자 없음, stay2 실물에서 추출)와 paperTemplate() 을 추가해 stay·restaurant·cafe 세 업종의 네 번째 템플릿으로 등록. DOM 구조 이식은 solution/site 커밋에서 별도로 한다.
This commit is contained in:
parent
951e451ef8
commit
362c76d6c9
@ -48,6 +48,16 @@ const LOOK = {
|
||||
texture:
|
||||
'repeating-linear-gradient(0deg,rgba(27,26,21,.028) 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,rgba(27,26,21,.02) 0 1px,transparent 1px 4px)',
|
||||
},
|
||||
paper: {
|
||||
fontHeading: "'Noto Serif KR', 'AppleMyungjo', 'Nanum Myeongjo', serif",
|
||||
fontBody: "'Pretendard Variable', 'Noto Sans KR', system-ui, sans-serif",
|
||||
radius: '0px',
|
||||
borderWidth: '1px',
|
||||
shadow: 'none',
|
||||
headingTracking: '0.03em',
|
||||
headingWeight: '400',
|
||||
sectionSpace: '4.5rem',
|
||||
},
|
||||
} as const;
|
||||
|
||||
/** 업종 하나의 템플릿 세 벌. accent 만 업종이 정한다. */
|
||||
@ -151,6 +161,27 @@ function templatesFor(
|
||||
return retro.isDefault ? [items[2], items[0], items[1]] : items;
|
||||
}
|
||||
|
||||
function paperTemplate(industryId: IndustryType, description: string): TemplateItem {
|
||||
return {
|
||||
id: `${industryId}-paper`,
|
||||
industryId,
|
||||
name: '고택',
|
||||
tone: 'book',
|
||||
toneLabel: '고택 지면',
|
||||
description,
|
||||
colors: {
|
||||
primary: '#1f1d19',
|
||||
secondary: '#726c61',
|
||||
bg: '#fdfcfa',
|
||||
card: '#f2efe8',
|
||||
text: '#1f1d19',
|
||||
accent: '#1f1d19',
|
||||
},
|
||||
fontStyle: '정갈한 명조',
|
||||
look: LOOK.paper,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
stay: {
|
||||
@ -183,14 +214,17 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'weather', type: 'weather', name: '날씨', isLocked: false, isEnabled: true, description: '현재 기온과 사업장 주변 날씨' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('stay', '#2563eb', {
|
||||
name: '옛 항구',
|
||||
description: '갱지 바탕에 간판체. 도넛판·일력·승차권이 함께 들어옵니다. 오래된 항구 도시의 인상으로 묵는 곳을 소개합니다.',
|
||||
// 숙박의 기본 템플릿 (2026-09-10, 사장님 지시). 백엔드 `_DEFAULT_THEME` 도 stay-retro 다.
|
||||
isDefault: true,
|
||||
/** 시안의 사진 갤러리는 캐러셀이다. 색·서체만 맞고 모양이 기본이면 시안이 안 된다. */
|
||||
defaultVariants: {photos: 'photos.carousel'},
|
||||
}),
|
||||
templates: [
|
||||
...templatesFor('stay', '#2563eb', {
|
||||
name: '옛 항구',
|
||||
description: '갱지 바탕에 간판체. 도넛판·일력·승차권이 함께 들어옵니다. 오래된 항구 도시의 인상으로 묵는 곳을 소개합니다.',
|
||||
// 숙박의 기본 템플릿 (2026-09-10, 사장님 지시). 백엔드 `_DEFAULT_THEME` 도 stay-retro 다.
|
||||
isDefault: true,
|
||||
/** 시안의 사진 갤러리는 캐러셀이다. 색·서체만 맞고 모양이 기본이면 시안이 안 된다. */
|
||||
defaultVariants: {photos: 'photos.carousel'},
|
||||
}),
|
||||
paperTemplate('stay', '크림빛 종이에 가는 명조. 그림자도 장식도 없이, 백 년 된 집의 정갈함을 그대로 보여줍니다.'),
|
||||
],
|
||||
},
|
||||
|
||||
cafe: {
|
||||
@ -217,10 +251,13 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'faq', type: 'faq', name: '자주 묻는 질문', isLocked: false, isEnabled: true, description: '반려견 동반, 주차, 케어키즈존 안내' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('cafe', '#b45309', {
|
||||
name: '옛 다방',
|
||||
description: '갱지 바탕에 간판체. LP 와 손글씨로, 다방 시절의 인상으로 지금의 커피를 이야기합니다.',
|
||||
}),
|
||||
templates: [
|
||||
...templatesFor('cafe', '#b45309', {
|
||||
name: '옛 다방',
|
||||
description: '갱지 바탕에 간판체. LP 와 손글씨로, 다방 시절의 인상으로 지금의 커피를 이야기합니다.',
|
||||
}),
|
||||
paperTemplate('cafe', '크림빛 종이에 가는 명조. 그림자도 장식도 없이, 조용한 카페의 정갈함을 그대로 보여줍니다.'),
|
||||
],
|
||||
},
|
||||
|
||||
restaurant: {
|
||||
@ -247,10 +284,13 @@ export const INDUSTRY_CONFIGS: Record<IndustryType, IndustryData> = {
|
||||
{ id: 'faq', type: 'faq', name: '자주 묻는 질문', isLocked: false, isEnabled: true, description: '콜키지 정책, 알러지 케어, 주차 안내' },
|
||||
{ id: 'social', type: 'social', name: 'SNS 게시글', isLocked: false, isEnabled: false, description: '승인해 함께 발행한 소식 · 홈페이지 맨 아래' },
|
||||
],
|
||||
templates: templatesFor('restaurant', '#16a34a', {
|
||||
name: '노포',
|
||||
description: '갱지 바탕에 간판체. 오래 해온 집이라는 사실 자체가 메뉴판이 됩니다.',
|
||||
}),
|
||||
templates: [
|
||||
...templatesFor('restaurant', '#16a34a', {
|
||||
name: '노포',
|
||||
description: '갱지 바탕에 간판체. 오래 해온 집이라는 사실 자체가 메뉴판이 됩니다.',
|
||||
}),
|
||||
paperTemplate('restaurant', '크림빛 종이에 가는 명조. 고택에서 차리는 한 상처럼, 담백하고 단정한 인상을 남깁니다.'),
|
||||
],
|
||||
},
|
||||
|
||||
clinic: {
|
||||
|
||||
@ -207,6 +207,7 @@ export function Step2PlaceSearch() {
|
||||
}
|
||||
clearIdentity();
|
||||
search.reset();
|
||||
goToStep('search', {params: {placeId: null, flow: null}, replace: true});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps -- 들어올 때 한 번만 판단한다
|
||||
}, []);
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ export function BuilderPage() {
|
||||
* 딥링크(/builder?placeId=...)가 우선이다 — 사업장 목록에서 다른 가게를 열 수 있어야 한다.
|
||||
*/
|
||||
const wizardPlaceId = useBuilderStore((s) => s.confirmedIdentity?.placeId ?? null);
|
||||
const placeId = urlPlaceId ?? wizardPlaceId;
|
||||
const placeId = step === 'search' ? null : (urlPlaceId ?? wizardPlaceId);
|
||||
const sync = usePlaceSync(placeId, {isOnboarding});
|
||||
|
||||
const storeName = useBuilderStore((s) => s.storeName);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user