This commit is contained in:
@@ -13,6 +13,7 @@ import { Clock } from "iconsax-react";
|
|||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useParams, useRouter } from "next/navigation";
|
import { useParams, useRouter } from "next/navigation";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { OrderStatus } from "../../checkout/enum/Enum";
|
||||||
import { useCancelOrder, useGetOrderDetail } from "../../checkout/hooks/useOrderData";
|
import { useCancelOrder, useGetOrderDetail } from "../../checkout/hooks/useOrderData";
|
||||||
|
|
||||||
const getDeliveryMethodTitle = (method: string) => {
|
const getDeliveryMethodTitle = (method: string) => {
|
||||||
@@ -215,7 +216,11 @@ function OrderTrackingPage() {
|
|||||||
type="submit"
|
type="submit"
|
||||||
onClick={toggleCancelModal}
|
onClick={toggleCancelModal}
|
||||||
className="bg-disabled! text-foreground!"
|
className="bg-disabled! text-foreground!"
|
||||||
disabled={orderDetail?.data?.status === "cancelled" || orderDetail?.data?.status === "delivered" || orderDetail?.data?.status === "delivering"}
|
disabled={
|
||||||
|
orderDetail?.data?.status === 'cancelled' ||
|
||||||
|
orderDetail?.data?.status === "delivered" ||
|
||||||
|
orderDetail?.data?.status === "delivering"
|
||||||
|
}
|
||||||
>
|
>
|
||||||
لغو سفارش
|
لغو سفارش
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user