diff --git a/src/coupon-cell/index.tsx b/src/coupon-cell/index.tsx index 85958e481..5be6426eb 100644 --- a/src/coupon-cell/index.tsx +++ b/src/coupon-cell/index.tsx @@ -23,7 +23,7 @@ function formatValue(props: CouponCellProps) { const coupon = coupons[chosenCoupon]; if (coupon) { - const value = coupon.denominations || coupon.value; + const value = coupon.value || coupon.denominations || 0; return `-${currency}${(value / 100).toFixed(2)}`; } diff --git a/src/coupon-list/test/__snapshots__/index.spec.js.snap b/src/coupon-list/test/__snapshots__/index.spec.js.snap index e148f979d..b6fb1631a 100644 --- a/src/coupon-list/test/__snapshots__/index.spec.js.snap +++ b/src/coupon-list/test/__snapshots__/index.spec.js.snap @@ -37,7 +37,7 @@ exports[`empty-image prop 1`] = ` exports[`render coupon cell 1`] = `
优惠券
-
使用优惠
+
暂无可用
`; diff --git a/src/locale/lang/en-US.ts b/src/locale/lang/en-US.ts index b65e30e93..0e53a4627 100644 --- a/src/locale/lang/en-US.ts +++ b/src/locale/lang/en-US.ts @@ -42,7 +42,7 @@ export default { }, vanCouponCell: { title: 'Coupon', - tips: 'Select coupon', + tips: 'No coupons', count: (count: number) => `You have ${count} coupons` }, vanCouponList: { diff --git a/src/locale/lang/es-ES.ts b/src/locale/lang/es-ES.ts index 9471a0b56..334f9af27 100644 --- a/src/locale/lang/es-ES.ts +++ b/src/locale/lang/es-ES.ts @@ -42,7 +42,7 @@ export default { }, vanCouponCell: { title: 'Cupón', - tips: 'Selecciona cupón', + tips: 'Sin cupones', count: (count: number) => `You have ${count} coupons` }, vanCouponList: { diff --git a/src/locale/lang/tr-TR.ts b/src/locale/lang/tr-TR.ts index 450cc0365..5750a1b0a 100644 --- a/src/locale/lang/tr-TR.ts +++ b/src/locale/lang/tr-TR.ts @@ -42,7 +42,7 @@ export default { }, vanCouponCell: { title: 'Kupon', - tips: 'Kupon seç', + tips: 'Kupon yok', count: (count: number) => `${count} adet teklif var` }, vanCouponList: { diff --git a/src/locale/lang/zh-CN.ts b/src/locale/lang/zh-CN.ts index fac901e63..69b9300ee 100644 --- a/src/locale/lang/zh-CN.ts +++ b/src/locale/lang/zh-CN.ts @@ -43,7 +43,7 @@ export default { }, vanCouponCell: { title: '优惠券', - tips: '使用优惠', + tips: '暂无可用', count: (count: number) => `${count}张可用` }, vanCouponList: { diff --git a/src/locale/lang/zh-HK.ts b/src/locale/lang/zh-HK.ts index 203386b28..d8ad6956d 100644 --- a/src/locale/lang/zh-HK.ts +++ b/src/locale/lang/zh-HK.ts @@ -43,7 +43,7 @@ export default { }, vanCouponCell: { title: '優惠券', - tips: '使用優惠', + tips: '暫無可用', count: (count: number) => `${count}張可用` }, vanCouponList: { diff --git a/src/locale/lang/zh-TW.ts b/src/locale/lang/zh-TW.ts index 0c2cb84b7..4c28e7757 100644 --- a/src/locale/lang/zh-TW.ts +++ b/src/locale/lang/zh-TW.ts @@ -43,7 +43,7 @@ export default { }, vanCouponCell: { title: '優惠券', - tips: '使用優惠', + tips: '暫無可用', count: (count: number) => `${count}張可用` }, vanCouponList: {