update address

This commit is contained in:
hamid zarghami
2026-06-06 11:48:22 +03:30
parent 347017f1be
commit 931cc76a47
7 changed files with 70 additions and 20 deletions
@@ -6,6 +6,7 @@ import Modal from '@/components/utils/Modal';
import Link from 'next/link';
import { useEffect, useState } from 'react';
import { ef } from '@/lib/helpers/utfNumbers';
import { Edit2 } from 'iconsax-react';
const formatAddress = (address: Address) => {
return `${address.address}، ${address.city}، ${address.province}`;
@@ -78,6 +79,20 @@ export const AddressSelectionModal = ({
<p className='text-xs mt-2 text-disabled-text'>
تلفن: {ef(address.phone)}
</p>
<div className='mt-3 flex justify-end'>
<Link
href={`/${name}/profile/address/new?id=${address.id}&redirect=${encodeURIComponent(redirectUrl)}`}
onClick={(e) => e.stopPropagation()}
>
<button
type='button'
className='text-xs text-primary dark:text-foreground flex items-center gap-1'
>
<Edit2 className='size-4 stroke-primary dark:stroke-foreground' />
ویرایش
</button>
</Link>
</div>
</div>
))}
</div>