import { Badge, Card } from "antd"; import ArabicPrice from "components/ArabicPrice"; import ImageWithFallback from "components/ImageWithFallback"; import { ItemDescriptionIcons } from "components/ItemDescriptionIcons/ItemDescriptionIcons"; import ProText from "components/ProText"; import useBreakPoint from "hooks/useBreakPoint"; import { AddToCartButton } from "pages/menu/components/AddToCartButton/AddToCartButton.tsx"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { useAppSelector } from "redux/hooks"; import { colors } from "ThemeConstants"; import { Product } from "utils/types/appTypes"; import styles from "../MenuList/MenuList.module.css"; interface MenuListProps { products: Product[]; } export function SearchMenu({ products }: MenuListProps) { const { isRTL } = useAppSelector((state) => state.locale); const { isMobile, isTablet } = useBreakPoint(); const { items } = useAppSelector((state) => state.order); const restaurantName = localStorage.getItem("restaurantName"); const navigate = useNavigate(); const { t } = useTranslation(); const { themeName } = useAppSelector((state) => state.theme); // Show error state if data exists but has no products if (products && (!products || products.length === 0)) { return (