[feat] solution: 추천 일정 카드에 출발지(업소명·출발 시각) 한 줄을 얹는다

This commit is contained in:
skkim committed 2026-09-11 14:07:17 +09:00
1 parent 6760b38fec
commit 8a2964ebf7
2 files changed
+26 -1

No files matched your search

@@ -18,6 +18,7 @@ import {
type PlannedStop,
} from '@o2o/shared';
import {useLocalGuide} from '@/hooks/useLocalGuide';
import {useBuilderStore} from '@/stores/builder';
import {SectionBody, SectionFrame, Rail} from '../../primitives';
import type {SectionRenderProps} from '../../types';
import {
@@ -36,6 +37,7 @@ export function ItineraryTickets(props: SectionRenderProps) {
const {section, isSelected, onSelect} = props;
const parsed = parseSectionData<ItineraryItem>(section.type, section.data);
const guide = useLocalGuide();
const placeName = useBuilderStore((s) => s.storeName);
// 사장님이 적은 것이 언제나 이긴다 — 서버가 만든 건 비었을 때의 기본값이다.
const items = parsed.items.length > 0 ? parsed.items : guide.itineraries;
const live = currentSeasons();
@@ -105,6 +107,13 @@ export function ItineraryTickets(props: SectionRenderProps) {
{itineraryDays(item).map((entry, dayIndex) => (
<div key={`${entry.label}-${dayIndex}`} className="space-y-1.5">
{/* ★ 출발지 — 첫날에만. 일정 데이터에는 없다(프롬프트가 정거장으로
못 넣게 막는다) — 빌더가 이미 아는 상호명을 그 자리에서 얹는다. */}
{dayIndex === 0 && placeName && (
<p className="text-[11px] opacity-50">
{placeName}에서 출발 · {entry.day.from}
</p>
)}
{entry.label && (
<p className="text-[11px] font-bold" style={{color: ITEM_ACCENT}}>
{entry.label}