@umituz/react-native-ai-generation-content 1.90.17 → 1.90.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.90.
|
|
3
|
+
"version": "1.90.19",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
useCredits,
|
|
19
19
|
usePaywallVisibility,
|
|
20
20
|
useFeatureGate,
|
|
21
|
+
usePremiumStatus,
|
|
21
22
|
} from "@umituz/react-native-subscription";
|
|
22
23
|
import type {
|
|
23
24
|
AIFeatureGateOptions,
|
|
@@ -48,10 +49,9 @@ export function useAIFeatureGate(options: AIFeatureGateOptions): AIFeatureGateRe
|
|
|
48
49
|
const { showAuthModal } = useAuthModalStore();
|
|
49
50
|
const { credits, isCreditsLoaded, isLoading: isCreditsLoading } = useCredits();
|
|
50
51
|
const { openPaywall } = usePaywallVisibility();
|
|
52
|
+
const { isPremium } = usePremiumStatus();
|
|
51
53
|
const creditBalance = credits?.credits ?? 0;
|
|
52
54
|
const hasCredits = creditBalance >= creditCost;
|
|
53
|
-
// TODO: Replace with actual premium status check from subscription package
|
|
54
|
-
const isPremium = false;
|
|
55
55
|
|
|
56
56
|
const { requireFeature: requireFeatureFromPackage } = useFeatureGate({
|
|
57
57
|
isAuthenticated: hasFirebaseUser,
|
|
@@ -29,12 +29,12 @@ export function useProcessingJobsPoller(
|
|
|
29
29
|
if (!enabled || !userId) return;
|
|
30
30
|
|
|
31
31
|
const timer = setInterval(() => {
|
|
32
|
-
// Polling logic
|
|
32
|
+
// Stub: Polling logic to be implemented when job status API is available
|
|
33
33
|
const processingCreations = creations.filter(c => c.status === 'processing');
|
|
34
34
|
processingCreations.forEach(async (creation) => {
|
|
35
35
|
try {
|
|
36
36
|
// Check job status and update creation
|
|
37
|
-
//
|
|
37
|
+
// Note: Actual polling implementation requires job status API
|
|
38
38
|
} catch (error) {
|
|
39
39
|
console.error('Error polling job status:', error);
|
|
40
40
|
}
|