@umituz/react-native-ai-generation-content 1.22.5 → 1.22.6

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.22.5",
3
+ "version": "1.22.6",
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",
@@ -60,13 +60,9 @@ export const CoupleFutureWizard: React.FC<CoupleFutureWizardProps> = ({
60
60
  );
61
61
 
62
62
  const handleScenarioPreviewContinue = useCallback(() => {
63
- const checkFeature = callbacks?.requireFeature;
64
- if (checkFeature) {
65
- checkFeature(() => flow.nextStep());
66
- } else {
67
- flow.nextStep();
68
- }
69
- }, [flow, callbacks]);
63
+ // No auth check needed here - just proceed to photo upload
64
+ flow.nextStep();
65
+ }, [flow]);
70
66
 
71
67
  const handlePartnerAContinue = useCallback(
72
68
  (image: { uri: string; base64: string; mimeType: string }, name?: string) => {
@@ -83,8 +79,18 @@ export const CoupleFutureWizard: React.FC<CoupleFutureWizardProps> = ({
83
79
  flow.setPartnerImage("B", image);
84
80
  if (name) flow.setPartnerName("B", name);
85
81
  callbacks?.onPartnerUpload?.("B", image);
86
- flow.startGeneration();
87
- callbacks?.onGenerationStart?.();
82
+
83
+ // Check auth/credits BEFORE starting generation (this consumes a credit)
84
+ const checkFeature = callbacks?.requireFeature;
85
+ if (checkFeature) {
86
+ checkFeature(() => {
87
+ flow.startGeneration();
88
+ callbacks?.onGenerationStart?.();
89
+ });
90
+ } else {
91
+ flow.startGeneration();
92
+ callbacks?.onGenerationStart?.();
93
+ }
88
94
  },
89
95
  [flow, callbacks],
90
96
  );