()
| 20 | } |
| 21 | |
| 22 | export async function getUserCoupon() { |
| 23 | const country = await getUserCountry() |
| 24 | if (country == null) return |
| 25 | |
| 26 | const coupon = pppCoupons.find(coupon => |
| 27 | coupon.countryCodes.includes(country) |
| 28 | ) |
| 29 | |
| 30 | if (coupon == null) return |
| 31 | |
| 32 | return { |
| 33 | stripeCouponId: coupon.stripeCouponId, |
| 34 | discountPercentage: coupon.discountPercentage, |
| 35 | } |
| 36 | } |
no test coverage detected