From 4e3d43b2adc83a9ae303bfb6e55c3015df880a64 Mon Sep 17 00:00:00 2001 From: Jio Date: Mon, 27 Jul 2026 11:34:10 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=20=EC=82=B0=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=20=EB=A7=9B=EC=A7=91=20=ED=83=AD=20=EC=8B=9C=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B2=84=20=EC=A7=80=EB=8F=84(mapUrl)=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 맛집 아이템을 Pressable로 감싸 mapUrl로 Linking.openURL. RestaurantInfo 타입에 mapUrl 필드 추가. mapUrl 없으면 disabled 처리. --- .../components/restaurant-tab.tsx | 24 ++++++++++++++++--- types/api.generated.ts | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/features/mountains-detail/components/restaurant-tab.tsx b/features/mountains-detail/components/restaurant-tab.tsx index e4c89e2b..7f857549 100644 --- a/features/mountains-detail/components/restaurant-tab.tsx +++ b/features/mountains-detail/components/restaurant-tab.tsx @@ -1,7 +1,14 @@ import { LoadingSpinner } from "@/components/loading-spinner"; import { useMountainDetail } from "@/features/mountains/hooks/use-mountain-detail"; import { useLocalSearchParams } from "expo-router"; -import { Image, ScrollView, Text, View } from "react-native"; +import { + Image, + Linking, + Pressable, + ScrollView, + Text, + View, +} from "react-native"; export function RestaurantTab() { const { id } = useLocalSearchParams<{ id: string }>(); @@ -24,7 +31,18 @@ export function RestaurantTab() { contentContainerStyle={{ paddingHorizontal: 20, gap: 12 }} > {section.restaurants?.map((item) => ( - + { + // 맛집 탭 시 네이버 지도(mapUrl)로 이동 + if (!item.mapUrl) return; + Linking.openURL(item.mapUrl).catch((err) => + console.warn("[Restaurant] 지도 열기 실패:", err), + ); + }} + > {item.imageUrl ? ( - + ))} {/* TODO : 화면 개발되면 추가 */} {/* 더보기 버튼은 앞에 아이템 3개 이상일때 부터 추가 */} diff --git a/types/api.generated.ts b/types/api.generated.ts index 83cd40c4..bc3b6af3 100644 --- a/types/api.generated.ts +++ b/types/api.generated.ts @@ -556,6 +556,7 @@ export type RestaurantInfo = { name?: string; category?: string; imageUrl?: string; + mapUrl?: string; }; export type RestaurantSectionInfo = { title?: string; From bd737beadf903b94ebb2ce2717193a639356f869 Mon Sep 17 00:00:00 2001 From: Jio Date: Mon, 27 Jul 2026 11:40:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore=20:=20=EB=A7=9B=EC=A7=91=20=EB=8D=94?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=20=EB=AF=B8=EA=B5=AC=ED=98=84=20=EC=A3=BC?= =?UTF-8?q?=EC=84=9D=20=EB=B8=94=EB=A1=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/restaurant-tab.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/features/mountains-detail/components/restaurant-tab.tsx b/features/mountains-detail/components/restaurant-tab.tsx index 7f857549..718099f8 100644 --- a/features/mountains-detail/components/restaurant-tab.tsx +++ b/features/mountains-detail/components/restaurant-tab.tsx @@ -61,23 +61,6 @@ export function RestaurantTab() { ))} - {/* TODO : 화면 개발되면 추가 */} - {/* 더보기 버튼은 앞에 아이템 3개 이상일때 부터 추가 */} - {/* {(section.restaurants?.length ?? 0) >= 3 && ( - { - // TODO: 맛집 더보기 화면으로 이동 - }} - > - - {section.title} - - - {"더보기 >"} - - - )} */} ))}