[Developer] #532 지역 표시 계층화 formatRegion (한국|서울 → 한국 › 서울)

- lib/region.ts formatRegion() 신설: 파이프 분리 + 빈토큰/null/나라 더미 제거 + ' › ' 조인
- RestaurantDetail/RestaurantList 지역 표기에 적용
- buildSearchQuery(검색용 공백조인) 유지
- 설계서 docs/design/532-region-display/README.md

Refs #532

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
joungmin
2026-06-28 16:15:53 +09:00
parent 2eb16ce861
commit 4760b5a284
5 changed files with 78 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import ReviewSection from "@/components/ReviewSection";
import MemoSection from "@/components/MemoSection";
import { RestaurantDetailSkeleton } from "@/components/Skeleton";
import Icon from "@/components/Icon";
import { formatRegion } from "@/lib/region";
interface RestaurantDetailProps {
restaurant: Restaurant;
@@ -129,7 +130,7 @@ export default function RestaurantDetail({
)}
{restaurant.region && (
<p>
<span className="text-gray-400 dark:text-gray-500"></span> <span className="text-gray-600 dark:text-gray-300">{restaurant.region}</span>
<span className="text-gray-400 dark:text-gray-500"></span> <span className="text-gray-600 dark:text-gray-300">{formatRegion(restaurant.region)}</span>
</p>
)}
{restaurant.price_range && (