This commit is contained in:
imeepos
2025-11-12 16:50:51 +08:00
parent daf9cca667
commit 12a1df8481
2 changed files with 15 additions and 56 deletions

View File

@@ -261,8 +261,15 @@ export function usePricing() {
return null;
}
// 检查 pricing data 是否加载完成
if (!stripePricingData?.pricing_table_items?.[0]?.metered_price_id) {
Alert.alert('Error', 'Pricing data not available');
Alert.alert('Error', 'Pricing data not available. Please try again later.');
return null;
}
// 检查用户是否有 metered subscription
if (!meteredSubscriptions || meteredSubscriptions.length === 0 || !meteredSubscriptions[0]?.priceId) {
Alert.alert('Error', 'No active metered subscription found. Please contact support.');
return null;
}