fix: bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user