@umituz/react-native-ai-creations 1.2.16 → 1.2.17
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-creations",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.17",
|
|
4
4
|
"description": "AI-generated creations gallery with filtering, sharing, and management for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
"@umituz/react-native-alert": "latest"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
+
"@react-navigation/native": ">=6.0.0",
|
|
34
35
|
"@tanstack/react-query": ">=5.0.0",
|
|
35
36
|
"@umituz/react-native-bottom-sheet": "latest",
|
|
36
37
|
"@umituz/react-native-design-system": "latest",
|
|
37
|
-
"@umituz/react-native-firebase": "latest",
|
|
38
38
|
"@umituz/react-native-filter": "latest",
|
|
39
|
+
"@umituz/react-native-firebase": "latest",
|
|
39
40
|
"@umituz/react-native-image": "latest",
|
|
40
41
|
"@umituz/react-native-sharing": "latest",
|
|
41
42
|
"expo-linear-gradient": ">=14.0.0",
|
|
@@ -45,15 +46,16 @@
|
|
|
45
46
|
"react-native-safe-area-context": ">=5.0.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"@umituz/react-native-filter": "latest",
|
|
50
|
-
"@umituz/react-native-image": "latest",
|
|
51
|
-
"expo-linear-gradient": "^15.0.8",
|
|
49
|
+
"@react-navigation/native": "^7.1.26",
|
|
52
50
|
"@tanstack/react-query": "^5.62.16",
|
|
53
51
|
"@types/react": "^19.0.0",
|
|
52
|
+
"@umituz/react-native-bottom-sheet": "latest",
|
|
54
53
|
"@umituz/react-native-design-system": "latest",
|
|
54
|
+
"@umituz/react-native-filter": "latest",
|
|
55
55
|
"@umituz/react-native-firebase": "latest",
|
|
56
|
+
"@umituz/react-native-image": "latest",
|
|
56
57
|
"@umituz/react-native-sharing": "latest",
|
|
58
|
+
"expo-linear-gradient": "^15.0.8",
|
|
57
59
|
"firebase": "^11.0.0",
|
|
58
60
|
"react": "19.1.0",
|
|
59
61
|
"react-native": "0.81.5",
|
|
@@ -7,7 +7,7 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
7
7
|
import type { ICreationsRepository } from "../../domain/repositories/ICreationsRepository";
|
|
8
8
|
|
|
9
9
|
const CACHE_CONFIG = {
|
|
10
|
-
staleTime:
|
|
10
|
+
staleTime: 0, // Always fetch fresh data to show new creations immediately
|
|
11
11
|
gcTime: 30 * 60 * 1000,
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -4,6 +4,7 @@ import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
|
4
4
|
import { useSharing } from "@umituz/react-native-sharing";
|
|
5
5
|
import { ImageGallery } from "@umituz/react-native-image";
|
|
6
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
7
|
+
import { useFocusEffect } from "@react-navigation/native";
|
|
7
8
|
import { useCreations } from "../hooks/useCreations";
|
|
8
9
|
import { useDeleteCreation } from "../hooks/useDeleteCreation";
|
|
9
10
|
import { useCreationsFilter } from "../hooks/useCreationsFilter";
|
|
@@ -51,6 +52,13 @@ export function CreationsGalleryScreen({
|
|
|
51
52
|
const deleteMutation = useDeleteCreation({ userId, repository });
|
|
52
53
|
const { filtered, selectedIds, toggleFilter, clearFilters, isFiltered } = useCreationsFilter({ creations });
|
|
53
54
|
|
|
55
|
+
// Refetch creations when screen comes into focus
|
|
56
|
+
useFocusEffect(
|
|
57
|
+
useCallback(() => {
|
|
58
|
+
refetch();
|
|
59
|
+
}, [refetch])
|
|
60
|
+
);
|
|
61
|
+
|
|
54
62
|
const allCategories = useMemo(() => {
|
|
55
63
|
const categories: FilterCategory[] = [];
|
|
56
64
|
if (config.types.length > 0) {
|