import { Form, Layout } from "antd"; import InputCard from "components/InputCard"; import OrderSummary from "components/OrderSummary/OrderSummary"; import PaymentMethods from "components/PaymentMethods/PaymentMethods"; import ProHeader from "components/ProHeader/ProHeader"; import { selectCart, updateCollectionMethod } from "features/order/orderSlice"; import { useTranslation } from "react-i18next"; import { useAppSelector } from "redux/hooks"; import styles from "../address/address.module.css"; import { AddressSummary } from "./components/AddressSummary"; import BriefMenu from "./components/BriefMenu"; import CheckoutButton from "./components/CheckoutButton"; import { GiftCard } from "./components/GiftCard"; import PhoneCard from "./components/phoneCard"; import { OrderType } from "./hooks/types"; import RewardWaiterCard from "pages/cart/components/RewardWaiterCard"; import ProInputCard from "components/ProInputCard/ProInputCard"; import ProRatioGroups from "components/ProRatioGroups/ProRatioGroups"; import CouponCard from "pages/cart/components/CouponCard"; export default function CheckoutPage() { const { t } = useTranslation(); const [form] = Form.useForm(); const { phone, order, orderType, collectionMethod } = useAppSelector(selectCart); const { token } = useAppSelector((state) => state.auth); return ( <>
{t("checkout.title")} {!token && } {orderType === OrderType.ToRoom && ( )} {orderType === OrderType.ToOffice && ( )} {orderType === OrderType.Gift && } {/* */} {/* */} {/* */} {/* Collection Method */} {orderType === OrderType.Pickup && ( { if (value === "cod") { updateCollectionMethod(value); } else { updateCollectionMethod(value); } }} /> )} {/* Reward Your Waiter */}
); }