fix loyalty issue

This commit is contained in:
2025-11-04 13:30:21 +03:00
parent a9dff9ca53
commit 500da222ee

View File

@@ -12,11 +12,11 @@ import styles from "./LoyaltyCard.module.css";
const LoyaltyCard = () => {
const { t } = useTranslation();
const { subdomain } = useParams();
const { data: restaurant } = useGetRestaurantDetailsQuery("595");
const { data: restaurant } = useGetRestaurantDetailsQuery(subdomain);
const token = localStorage.getItem(ACCESS_TOKEN);
const isHasLoyaltyGift =
(restaurant?.loyalty_stamps ?? 0) -
(restaurant?.customer_loyalty_points ?? 0) <=
(restaurant?.loyalty_stamps || 0) -
(restaurant?.customer_loyalty_points || 0) <=
0;
return (