diff --git a/src/components/LoyaltyCard/LoyaltyCard.module.css b/src/components/LoyaltyCard/LoyaltyCard.module.css index 248f0f7..c4e4038 100644 --- a/src/components/LoyaltyCard/LoyaltyCard.module.css +++ b/src/components/LoyaltyCard/LoyaltyCard.module.css @@ -36,9 +36,9 @@ background-image: url(/empty-dish.png); background-size: cover; background-position: center; - width: 32px; - height: 32px; - border-radius: 50%; + width: 40px; + height: 40px; + border-radius: 6px; border: none; margin-left: 0px; } diff --git a/src/components/LoyaltyCard/LoyaltyCard.tsx b/src/components/LoyaltyCard/LoyaltyCard.tsx index f5c3f30..5ac5f74 100644 --- a/src/components/LoyaltyCard/LoyaltyCard.tsx +++ b/src/components/LoyaltyCard/LoyaltyCard.tsx @@ -87,54 +87,41 @@ const LoyaltyCard = () => { )} - - {/* */} - + {/* */} )} {token && !isHasLoyaltyGift && ( - - -
-
- - - x - {(restaurant?.loyalty_stamps ?? 0) - - (restaurant?.customer_loyalty_points ?? 0)} - {" "} -
-
- - {/* - - */} -
+
+ {Array.from({ length: restaurant?.loyalty_stamps || 0 }).map( + (_, index) => { + const currentPoints = restaurant?.customer_loyalty_points || 0; + const isCollected = index < currentPoints; + return ( + + + + ); + }, + )} +
)}