From 2c7a8d369a82b75596a446e833f873c99bdc03bd Mon Sep 17 00:00:00 2001 From: Mohammed Al-yaseen Date: Wed, 14 Jan 2026 00:09:49 +0300 Subject: [PATCH] loyalty: enhance card texts --- src/assets/locals/ar.json | 6 ++- src/assets/locals/en.json | 4 +- src/components/LoyaltyCard/LoyaltyCard.tsx | 44 +++++++++++----------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/assets/locals/ar.json b/src/assets/locals/ar.json index d74d771..3a97f7c 100644 --- a/src/assets/locals/ar.json +++ b/src/assets/locals/ar.json @@ -166,7 +166,9 @@ "address": "العنوان", "openingTimes": "ساعات العمل", "customizable": "قابل للتخصيص", - "youHaveXEarnedRewardsReadyToRedeem": "🎉 لديك {{rewards}} مكافأة مستحقة للاستخدام!" + "youHaveXEarnedRewardsReadyToRedeem": "🎉 لديك {{rewards}} مكافأة مستحقة للاستخدام!", + "justXMorePurchasesToUnlockYourFREEItem": "فقط {{cups}} أكثر للفتح الوجبة المجانية!", + "youreJustXCupsAwayFromYourNextReward": "🎉 أنت فقط {{cups}} أكثر للحصول على المكافأة التالية!" }, "cart": { "addSpecialRequestOptional": "إضافة طلب خاص (اختياري)", @@ -593,5 +595,5 @@ "yourOrderFrom": "طلبك من {{restaurantName}}", "earned": "حصل على", "xPoints": "{{points}} نقطة" - } + } } diff --git a/src/assets/locals/en.json b/src/assets/locals/en.json index 50361f4..4cfebc4 100644 --- a/src/assets/locals/en.json +++ b/src/assets/locals/en.json @@ -178,7 +178,9 @@ "address": "Address", "openingTimes": "Opening Times", "customizable": "Customizable", - "youHaveXEarnedRewardsReadyToRedeem": "🎉 You have {{rewards}} rewards ready to redeem!" + "youHaveXEarnedRewardsReadyToRedeem": "🎉 You have {{rewards}} rewards ready to redeem!", + "justXMorePurchasesToUnlockYourFREEItem": "Just {{cups}} more purchases to unlock your FREE item!", + "youreJustXCupsAwayFromYourNextReward": "🎉 You're just {{cups}} cups away from your next reward!" }, "cart": { "remainingToPay": "Remaining to Pay", diff --git a/src/components/LoyaltyCard/LoyaltyCard.tsx b/src/components/LoyaltyCard/LoyaltyCard.tsx index cf2ec50..556a6fc 100644 --- a/src/components/LoyaltyCard/LoyaltyCard.tsx +++ b/src/components/LoyaltyCard/LoyaltyCard.tsx @@ -115,27 +115,25 @@ const LoyaltyCard = () => { paddingBottom: 12, }} > - {Array.from({ length: loyaltyStamps }).map( - (_, index) => { - const currentPoints = customerLoyaltyPoints % loyaltyStamps; - const isCollected = index < currentPoints; - return ( - - - - ); - }, - )} + {Array.from({ length: loyaltyStamps }).map((_, index) => { + const currentPoints = customerLoyaltyPoints % loyaltyStamps; + const isCollected = index < currentPoints; + return ( + + + + ); + })} { }} > {customerLoyaltyPoints < loyaltyStamps && - t("rewardsAndLoyalty.youreJustXCupsAwayFromYourNextReward", { + t("menu.justXMorePurchasesToUnlockYourFREEItem", { cups: remainingToNextReward, })} {customerLoyaltyPoints >= loyaltyStamps && - t("rewardsAndLoyalty.youreJustXCupsAwayFromYourNextReward", { + t("menu.youreJustXCupsAwayFromYourNextReward", { cups: remainingToNextReward, })}