import { StyleSheet, View } from "react-native"; import { BaseBox, StackCustom, TextCustom } from "@/components"; import { MapsV2Custom } from "@/components/Map/MapsV2Custom"; export default function Portofolio_BusinessLocation({ data, imageId, setOpenDrawerLocation, }: { data: { id: string; imageId: string; latitude: number; longitude: number; namePin: string; pinId: string; } | null; imageId?: string; setOpenDrawerLocation: (value: boolean) => void; }) { console.log("data", data); // Buat marker hanya jika data lengkap const markers = data?.latitude && data?.longitude ? [ { id: data.id || "location-marker", coordinate: [data.longitude, data.latitude] as [number, number], imageId, onSelected: () => { setOpenDrawerLocation(true); }, }, ] : []; return ( <> Lokasi Bisnis {!data ? ( Lokasi bisnis belum ditambahkan ) : ( )} ); } const styles = StyleSheet.create({ mapContainer: { width: "100%", height: 250, borderRadius: 8, overflow: "hidden", marginTop: 8, }, });