fix loyalty issue
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user