update address
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user