This commit is contained in:
hamid zarghami
2025-12-20 10:39:25 +03:30
parent ae35774e1f
commit 3c20231a97
@@ -90,11 +90,6 @@ function OrderDetailInex() {
return shipmentMethod.data.find((item) => item.id === deliveryType);
}, [shipmentMethod?.data, deliveryType]);
const shouldShowAddress = useMemo(() => {
if (!selectedDeliveryMethod) return true;
return selectedDeliveryMethod.method !== 'dineIn' && selectedDeliveryMethod.method !== 'deliveryCar';
}, [selectedDeliveryMethod]);
return (
<div className='h-full bg-inherit flex flex-col gap-5'>
<CheckoutHeader />
@@ -108,7 +103,7 @@ function OrderDetailInex() {
<CarAddressSection />
)}
{shouldShowAddress && (
{selectedDeliveryMethod?.method === 'deliveryCourier' && (
<AddressSection />
)}