refactor the use of plain string order types
This commit is contained in:
@@ -22,6 +22,7 @@ import YouMightAlsoLike from "pages/cart/components/youMayLike/YouMightAlsoLike.
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAppSelector } from "redux/hooks.ts";
|
||||
import CartFooter from "./cartFooter/CartFooter";
|
||||
import { OrderType } from "pages/checkout/hooks/types.ts";
|
||||
|
||||
interface CartDesktopLayoutProps {
|
||||
form: FormInstance;
|
||||
@@ -177,11 +178,10 @@ export default function CartDesktopLayout({ form }: CartDesktopLayoutProps) {
|
||||
<CouponCard />
|
||||
</div>
|
||||
|
||||
{orderType === "pickup" && <CarPlateCard />}
|
||||
{orderType === OrderType.Pickup && <CarPlateCard />}
|
||||
|
||||
{(orderType === "delivery" || orderType === "pickup") && (
|
||||
<TimeEstimateCard />
|
||||
)}
|
||||
{(orderType === OrderType.Delivery ||
|
||||
orderType === OrderType.Pickup) && <TimeEstimateCard />}
|
||||
|
||||
<div
|
||||
className={styles.desktopSidebarCard}
|
||||
@@ -191,7 +191,7 @@ export default function CartDesktopLayout({ form }: CartDesktopLayoutProps) {
|
||||
</div>
|
||||
|
||||
{/* Table Number */}
|
||||
{orderType === "dine-in" && (
|
||||
{orderType === OrderType.DineIn && (
|
||||
<div
|
||||
className={styles.desktopSidebarCard}
|
||||
style={{ "--animation-order": 3 } as React.CSSProperties}
|
||||
|
||||
Reference in New Issue
Block a user