From d1592286eef165533c21d52aec70dbb703cdcfd3 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Wed, 18 Dec 2024 15:03:52 +0700
Subject: feedback uat

---
 src/lib/maps/components/PinPointMap.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/lib/maps/components/PinPointMap.jsx')

diff --git a/src/lib/maps/components/PinPointMap.jsx b/src/lib/maps/components/PinPointMap.jsx
index 201fdeb4..acff5d67 100644
--- a/src/lib/maps/components/PinPointMap.jsx
+++ b/src/lib/maps/components/PinPointMap.jsx
@@ -66,6 +66,7 @@ const PinpointLocation = () => {
       if (data.results[0]) {
         const addressComponents = data.results[0].address_components;
         const details = {
+          route : getAddressComponent(addressComponents, 'route')+' '+getAddressComponent(addressComponents, 'street_number')+' '+getAddressComponent(addressComponents, 'administrative_area_level_7')+' '+getAddressComponent(addressComponents, 'administrative_area_level_6'),
           province: getAddressComponent(
             addressComponents,
             'administrative_area_level_1'
@@ -85,7 +86,6 @@ const PinpointLocation = () => {
           postalCode: getAddressComponent(addressComponents, 'postal_code'),
         };
         setDetailAddress(details);
-        console.log(details);
         setTempAddress(data.results[0].formatted_address);
       }
     } catch (error) {
@@ -115,10 +115,14 @@ const PinpointLocation = () => {
       alert('Silahkan pilih lokasi terlebih dahulu');
       return;
     }
+    // console.log('tempPosition', tempPosition.lat);
+    getAddress(tempPosition.lat, tempPosition.lng);
     setSelectedPosition(tempPosition);
     setAddressMaps(tempAddress);
   };
 
+  console.log('set selected position',selectedPosition);
+
   return (
     <div className='w-full'>
       <h3>Tentukan Pinpoint Lokasi</h3>
-- 
cgit v1.2.3

