@umituz/react-native-ai-generation-content 1.11.2 → 1.11.4
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
|
@@ -12,15 +12,15 @@ import type {
|
|
|
12
12
|
PhotoGenerationStatus,
|
|
13
13
|
} from "./photo-generation.types";
|
|
14
14
|
|
|
15
|
-
export interface UsePhotoGenerationReturn<TResult> extends PhotoGenerationState<TResult> {
|
|
16
|
-
generate:
|
|
15
|
+
export interface UsePhotoGenerationReturn<TInput, TResult> extends PhotoGenerationState<TResult> {
|
|
16
|
+
generate: (input: TInput) => Promise<void>;
|
|
17
17
|
reset: () => void;
|
|
18
18
|
status: PhotoGenerationStatus;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const usePhotoGeneration = <TInput, TResult, TSaveInput = any>(
|
|
22
22
|
config: PhotoGenerationConfig<TInput, TResult, TSaveInput>,
|
|
23
|
-
): UsePhotoGenerationReturn<TResult> => {
|
|
23
|
+
): UsePhotoGenerationReturn<TInput, TResult> => {
|
|
24
24
|
const {
|
|
25
25
|
generate: generateFn,
|
|
26
26
|
save: saveFn,
|
|
@@ -68,8 +68,7 @@ export const usePhotoGeneration = <TInput, TResult, TSaveInput = any>(
|
|
|
68
68
|
|
|
69
69
|
try {
|
|
70
70
|
// Check network connectivity
|
|
71
|
-
|
|
72
|
-
if (!isOnline) {
|
|
71
|
+
if (!offlineStore.isOnline) {
|
|
73
72
|
throw createError("network_error", "No internet connection");
|
|
74
73
|
}
|
|
75
74
|
|