import { Button } from "antd"; import ArabicPrice from "components/ArabicPrice"; import ProInputCard from "components/ProInputCard/ProInputCard"; import ProText from "components/ProText"; import { selectCart } from "features/order/orderSlice"; import { OrderType } from "pages/checkout/hooks/types.ts"; import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Link, useParams } from "react-router-dom"; import { useAppSelector } from "redux/hooks"; import { colors } from "ThemeConstants"; import styles from "../../address/address.module.css"; export default function BriefMenu() { const { tables, items } = useAppSelector(selectCart); const { t } = useTranslation(); const { orderType } = useAppSelector(selectCart); const { subdomain } = useParams(); const menuItems = useMemo( () => items.map((item, index) => (
{item.name}
)), [items], ); const cardTitle = useMemo( () => orderType === OrderType.DineIn || orderType === OrderType.Pay ? t("checkout.table") + " " + tables : t("checkout.items"), [orderType, t, tables], ); return ( {t("menu.title")} ) : undefined } >
{menuItems}
); }