import { Card, Col, Image, Row } from "antd"; import PresentIcon from "components/Icons/cart/PresentIcon"; import { useTranslation } from "react-i18next"; import { Link, useParams } from "react-router-dom"; import { useGetRestaurantDetailsQuery } from "redux/api/others"; import { ACCESS_TOKEN } from "utils/constants"; import { colors } from "ThemeConstants.ts"; import ProText from "../ProText"; import styles from "./LoyaltyCard.module.css"; import { useAppSelector } from "redux/hooks"; const LoyaltyCard = () => { const { t } = useTranslation(); const { subdomain } = useParams(); const { data: restaurant } = useGetRestaurantDetailsQuery(subdomain); const { isRTL } = useAppSelector((state) => state.locale); const token = localStorage.getItem(ACCESS_TOKEN); const loyaltyStamps = restaurant?.loyalty_stamps ?? 0; const customerLoyaltyPoints = restaurant?.customer_loyalty_points ?? 0; const remainingToNextReward = loyaltyStamps - (customerLoyaltyPoints % loyaltyStamps); return (