import { PlusOutlined } from "@ant-design/icons"; import { Button, Grid } from "antd"; import { addItem } from "features/order/orderSlice"; import { useTranslation } from "react-i18next"; import { useAppDispatch, useAppSelector } from "redux/hooks"; import { colors } from "ThemeConstants"; import { Product } from "utils/types/appTypes"; const { useBreakpoint } = Grid; export function AddToCart({ item }: { item: Product }) { const { isRTL } = useAppSelector((state) => state.locale); const { t } = useTranslation(); const dispatch = useAppDispatch(); const { xs, sm } = useBreakpoint(); const handleQuickAdd = (item: Product) => { dispatch( addItem({ item: { id: item.id, name: item.name, price: item.price, image: item.image, description: item.description, variant: "None", extras: [], extrasgroup: [], }, quantity: 1, }) ); }; return ( ); }