diff --git a/features/mountains-detail/components/restaurant-tab.tsx b/features/mountains-detail/components/restaurant-tab.tsx index e4c89e2b..718099f8 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개 이상일때 부터 추가 */} - {/* {(section.restaurants?.length ?? 0) >= 3 && ( - { - // TODO: 맛집 더보기 화면으로 이동 - }} - > - - {section.title} - - - {"더보기 >"} - - )} */} + ))} ))} 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;