@umituz/react-native-ai-generation-content 1.61.13 → 1.61.14

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.61.13",
3
+ "version": "1.61.14",
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",
@@ -155,25 +155,8 @@ export function CreationsGalleryScreen({
155
155
  const selectedImageUrl = selectedCreation ? (getPreviewUrl(selectedCreation.output) || selectedCreation.uri) : undefined;
156
156
  const selectedVideoUrl = selectedCreation?.output?.videoUrl;
157
157
  const hasMediaToShow = selectedImageUrl || selectedVideoUrl;
158
+ const showPreview = selectedCreation && hasMediaToShow;
158
159
 
159
- if (selectedCreation && hasMediaToShow) {
160
- return (
161
- <GalleryResultPreview
162
- selectedCreation={selectedCreation}
163
- imageUrl={selectedVideoUrl ? undefined : selectedImageUrl}
164
- videoUrl={selectedVideoUrl}
165
- showRatingPicker={showRatingPicker}
166
- config={config}
167
- t={t}
168
- onBack={callbacks.handleBack}
169
- onTryAgain={callbacks.handleTryAgain}
170
- onRate={callbacks.handleOpenRatingPicker}
171
- onSubmitRating={callbacks.handleSubmitRating}
172
- onCloseRating={() => setShowRatingPicker(false)}
173
- />
174
- );
175
- }
176
-
177
160
  const screenHeader = useMemo(() => {
178
161
  if (!onBack) return undefined;
179
162
 
@@ -197,6 +180,24 @@ export function CreationsGalleryScreen({
197
180
  );
198
181
  }, [onBack, tokens, t, config]);
199
182
 
183
+ if (showPreview) {
184
+ return (
185
+ <GalleryResultPreview
186
+ selectedCreation={selectedCreation}
187
+ imageUrl={selectedVideoUrl ? undefined : selectedImageUrl}
188
+ videoUrl={selectedVideoUrl}
189
+ showRatingPicker={showRatingPicker}
190
+ config={config}
191
+ t={t}
192
+ onBack={callbacks.handleBack}
193
+ onTryAgain={callbacks.handleTryAgain}
194
+ onRate={callbacks.handleOpenRatingPicker}
195
+ onSubmitRating={callbacks.handleSubmitRating}
196
+ onCloseRating={() => setShowRatingPicker(false)}
197
+ />
198
+ );
199
+ }
200
+
200
201
  return (
201
202
  <ScreenLayout scrollable={false} header={screenHeader}>
202
203
  <FlatList