This commit is contained in:
2025-10-22 20:54:52 +03:00
parent 37a7c28c56
commit 42882069a7
2 changed files with 24 additions and 28 deletions

View File

@@ -12,7 +12,7 @@ const LoyaltyCard = () => {
const { data: restaurant } = useGetRestaurantDetailsQuery("595"); const { data: restaurant } = useGetRestaurantDetailsQuery("595");
const isHasLoyaltyGift = const isHasLoyaltyGift =
(restaurant?.loyalty_stamps ?? 0) - (restaurant?.loyalty_stamps ?? 0) -
(restaurant?.customer_loyalty_points ?? 0) === (restaurant?.customer_loyalty_points ?? 0) <=
0; 0;
return ( return (
@@ -70,32 +70,28 @@ const LoyaltyCard = () => {
<Col> <Col>
<div className={styles.presentIcon}> <div className={styles.presentIcon}>
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
{isHasLoyaltyGift ? ( <Image
<> className={styles.presentIconItem}
<Image preview={false}
className={styles.presentIconItem} width={32}
preview={false} height={32}
width={32} src={restaurant?.loyalty_stamp_image}
height={32} />
src={restaurant?.loyalty_stamp_image} <ProText
/> type="secondary"
<ProText strong
type="secondary" style={{
strong fontSize: "1rem",
style={{ fontWeight: 400,
fontSize: "1rem", position: "relative",
fontWeight: 400, top: 3,
position: "relative", margin: "0 2px",
top: 3, }}
margin: "0 2px", >
}} x
> {(restaurant?.loyalty_stamps ?? 0) -
x (restaurant?.customer_loyalty_points ?? 0)}
{(restaurant?.loyalty_stamps ?? 0) - </ProText>{" "}
(restaurant?.customer_loyalty_points ?? 0)}
</ProText>{" "}
</>
) : null}
</div> </div>
</div> </div>
</Col> </Col>

View File

@@ -33,7 +33,7 @@ export default function OrderSummary() {
const { data: restaurant } = useGetRestaurantDetailsQuery("595"); const { data: restaurant } = useGetRestaurantDetailsQuery("595");
const isHasLoyaltyGift = const isHasLoyaltyGift =
(restaurant?.loyalty_stamps ?? 0) - (restaurant?.loyalty_stamps ?? 0) -
(restaurant?.customer_loyalty_points ?? 0) === (restaurant?.customer_loyalty_points ?? 0) <=
0; 0;
return ( return (