summaryrefslogtreecommitdiff
path: root/src/lib/address/components/EditAddress.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-06-12 11:00:00 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-06-12 11:00:00 +0700
commite0e0729ee57d2f9b1188a0604e3cc4a51317b0ed (patch)
treea3e1e0af99f0f918d61141d7220fa3408ce303a0 /src/lib/address/components/EditAddress.jsx
parent337e7a189efacbe696f4512130278952977b2da2 (diff)
<hafid> fix pinpoint
Diffstat (limited to 'src/lib/address/components/EditAddress.jsx')
-rw-r--r--src/lib/address/components/EditAddress.jsx21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/address/components/EditAddress.jsx b/src/lib/address/components/EditAddress.jsx
index cfb35fbd..743bb4c8 100644
--- a/src/lib/address/components/EditAddress.jsx
+++ b/src/lib/address/components/EditAddress.jsx
@@ -311,7 +311,12 @@ const EditAddress = ({ id, defaultValues }) => {
close={() => setPinedMaps(false)}
>
<div className='flex mt-4'>
- <PinPointMap />
+ <PinPointMap
+ initialLatitude={selectedPosition?.lat}
+ initialLongitude={selectedPosition?.lng}
+ initialAddress={tempAddress}
+ />
+
</div>
</BottomPopup>
<div className='max-w-none md:container mx-auto flex p-0 md:py-10'>
@@ -327,16 +332,20 @@ const EditAddress = ({ id, defaultValues }) => {
</div>
<form onSubmit={handleSubmit(onSubmitHandler)}>
<div className='mb-4 items-start'>
- <label className='form-label mb-2'>PinPoint</label>
+ <label className='form-label mb-2'>Koordinat Alamat</label>
{tempAddress ? (
<div className='flex gap-x-2 items-center'>
- <MapPinIcon class='h-6 w-6 text-gray-500 mr-3 cursor-pointer' onClick={() => setPinedMaps(true)} />{' '}
+ <button type='button' className="flex items-center justify-center me-3 p-2 bg-red-500 text-white rounded-full hover:bg-red-600 transition">
+ <MapPinIcon class='h-6 w-6' onClick={() => setPinedMaps(true)} />{' '}
+ </button>
<span> {tempAddress} </span>
</div>
) : (
- <Button variant='plain' onClick={() => setPinedMaps(true)}>
- <MapPinIcon class='h-6 w-6 text-gray-500 mr-3' />
- Pin Alamat
+ <Button variant='plain' style={{ padding: 0 }} onClick={() => setPinedMaps(true)}>
+ <button type='button' className="flex items-center justify-center me-3 p-2 bg-red-500 text-white rounded-full hover:bg-red-600 transition">
+ <MapPinIcon className="h-6 w-6" />
+ </button>
+ Pin Koordinat Alamat
</Button>
)}
</div>