|
|
@ -22,7 +22,7 @@ function Address({ |
|
|
|
const Location = ({ address, active }) => { |
|
|
|
const Location = ({ address, active }) => { |
|
|
|
return isMobile ? ( |
|
|
|
return isMobile ? ( |
|
|
|
<button |
|
|
|
<button |
|
|
|
className={`w-full flex flex-col items-center justify-between mt-2 px-3 py-2 border-2 border-solid transition-all duration-500 dark:bg-opacity-5 rounded-md ${ |
|
|
|
className={`w-full flex flex-col items-center justify-between mt-2 px-3 py-2 dark:bg-opacity-5 border border-opacity-30 transition-all duration-500 rounded-md ${ |
|
|
|
userAddressId === address?.id |
|
|
|
userAddressId === address?.id |
|
|
|
? "bg-blueC0 bg-opacity-5 border-blueC0" |
|
|
|
? "bg-blueC0 bg-opacity-5 border-blueC0" |
|
|
|
: "bg-grayF9 border-gray-200 dark:border-gray-500" |
|
|
|
: "bg-grayF9 border-gray-200 dark:border-gray-500" |
|
|
@ -71,7 +71,7 @@ function Address({ |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<button |
|
|
|
<button |
|
|
|
className={`bg-red-400 w-full flex items-center gap-x-5 justify-between mt-4 px-3 py-4 border-opacity-30 dark:bg-opacity-5 border border-solid transition-all duration-500 rounded-md ${ |
|
|
|
className={`w-full flex items-center justify-between gap-x-3 mt-4 px-3 py-4 dark:bg-opacity-5 border border-opacity-30 transition-all duration-500 rounded-md ${ |
|
|
|
userAddressId === address?.id |
|
|
|
userAddressId === address?.id |
|
|
|
? "bg-blueC0 bg-opacity-5 border-blueC0" |
|
|
|
? "bg-blueC0 bg-opacity-5 border-blueC0" |
|
|
|
: "bg-[#F9F9F9] border-gray-400" |
|
|
|
: "bg-[#F9F9F9] border-gray-400" |
|
|
@ -82,13 +82,13 @@ function Address({ |
|
|
|
: update({ userAddressId: address.id, userId }) |
|
|
|
: update({ userAddressId: address.id, userId }) |
|
|
|
} |
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
<div className="flex flex-row flex-1 gap-4"> |
|
|
|
<div className="flex flex-row flex-1"> |
|
|
|
{loading && userAddressId !== address?.id ? ( |
|
|
|
{loading && userAddressId !== address?.id ? ( |
|
|
|
<Loading size={2} color="bg-gray-400" /> |
|
|
|
<Loading size={2} color="bg-gray-400" /> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<Radio active={active} /> |
|
|
|
<Radio active={active} /> |
|
|
|
)} |
|
|
|
)} |
|
|
|
<div className="flex flex-col"> |
|
|
|
<div className="flex flex-col mr-2"> |
|
|
|
<li className="text-right text-tiny leading-6 text-blue52 dark:text-white"> |
|
|
|
<li className="text-right text-tiny leading-6 text-blue52 dark:text-white"> |
|
|
|
آدرس: {address.address} |
|
|
|
آدرس: {address.address} |
|
|
|
</li> |
|
|
|
</li> |
|
|
|