refactor(LOY-175): rewrite reward types according to new api endpoints

This commit is contained in:
Christian Andolf
2025-03-11 16:09:15 +01:00
parent 0ae4c5db17
commit b86347b4f4
15 changed files with 196 additions and 246 deletions

View File

@@ -125,11 +125,11 @@ export default function SurprisesNotification({
async function viewRewards() {
const updates = surprises
.map((surprise) => {
const coupons = surprise.coupons
const coupons = surprise.data.coupon
.map((coupon) => {
if (coupon.couponCode) {
return {
rewardId: surprise.id,
rewardId: surprise.data.id,
couponCode: coupon.couponCode,
}
}