react-query-firebase 2.15.1 → 3.0.0
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/dist/react-native/auth/useCurrentUser.js +1 -1
- package/dist/react-native.d.ts +2 -0
- package/dist/react-native.js +2 -0
- package/dist/web/auth/useCurrentUser.js +1 -1
- package/dist/web.d.ts +2 -0
- package/dist/web.js +2 -0
- package/package.json +9 -22
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -4
|
@@ -8,7 +8,7 @@ import { useAuth } from "./useAuth.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export const useCurrentUser = () => {
|
|
10
10
|
const firebaseAuth = useAuth();
|
|
11
|
-
const [currentUser, setCurrentUser] = useState(firebaseAuth
|
|
11
|
+
const [currentUser, setCurrentUser] = useState(firebaseAuth?.currentUser ?? null);
|
|
12
12
|
useEffect(() => {
|
|
13
13
|
const unsubscribe = onAuthStateChanged(firebaseAuth, (user) => {
|
|
14
14
|
setCurrentUser(user);
|
|
@@ -8,7 +8,7 @@ import { useAuth } from "./useAuth.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export const useCurrentUser = () => {
|
|
10
10
|
const firebaseAuth = useAuth();
|
|
11
|
-
const [currentUser, setCurrentUser] = useState(firebaseAuth
|
|
11
|
+
const [currentUser, setCurrentUser] = useState(firebaseAuth?.currentUser ?? null);
|
|
12
12
|
useEffect(() => {
|
|
13
13
|
const unsubscribe = onAuthStateChanged(firebaseAuth, (user) => {
|
|
14
14
|
setCurrentUser(user);
|
package/dist/web.d.ts
ADDED
package/dist/web.js
ADDED
package/package.json
CHANGED
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"@react-native-firebase/firestore": "^23.7.0",
|
|
30
30
|
"@react-native-firebase/installations": "^23.7.0",
|
|
31
31
|
"@react-native-firebase/remote-config": "^23.7.0",
|
|
32
|
-
"@tanstack/react-query": "^5.90.
|
|
32
|
+
"@tanstack/react-query": "^5.90.15",
|
|
33
33
|
"@types/react": "^19.2.7",
|
|
34
34
|
"eslint": "^9.39.2",
|
|
35
35
|
"eslint-config-prettier": "^10.1.8",
|
|
36
36
|
"eslint-plugin-import": "^2.32.0",
|
|
37
|
-
"eslint-plugin-jest": "^29.
|
|
37
|
+
"eslint-plugin-jest": "^29.11.2",
|
|
38
38
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
39
39
|
"eslint-plugin-prettier": "^5.5.4",
|
|
40
40
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
49
49
|
"typedoc-vitepress-theme": "^1.1.2",
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
|
-
"typescript-eslint": "^8.
|
|
51
|
+
"typescript-eslint": "^8.51.0",
|
|
52
52
|
"vitepress": "^1.6.4"
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://github.com/vpishuk/react-query-firebase",
|
|
@@ -66,24 +66,11 @@
|
|
|
66
66
|
},
|
|
67
67
|
"exports": {
|
|
68
68
|
".": {
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"import": "./dist/react-native/index.js",
|
|
75
|
-
"require": "./dist/react-native/index.js",
|
|
76
|
-
"types": "./dist/react-native/index.d.ts"
|
|
77
|
-
},
|
|
78
|
-
"./web": {
|
|
79
|
-
"import": "./dist/web/index.js",
|
|
80
|
-
"require": "./dist/web/index.js",
|
|
81
|
-
"types": "./dist/web/index.d.ts"
|
|
82
|
-
},
|
|
83
|
-
"./types": {
|
|
84
|
-
"import": "./dist/types/index.js",
|
|
85
|
-
"require": "./dist/types/index.js",
|
|
86
|
-
"types": "./dist/types/index.d.ts"
|
|
69
|
+
"browser": "./dist/web.js",
|
|
70
|
+
"react-native": "./dist/react-native.js",
|
|
71
|
+
"import": "./dist/web.js",
|
|
72
|
+
"require": "./dist/web.js",
|
|
73
|
+
"types": "./dist/web.d.ts"
|
|
87
74
|
}
|
|
88
75
|
},
|
|
89
76
|
"files": [
|
|
@@ -104,5 +91,5 @@
|
|
|
104
91
|
"docs:build": "vitepress build docs",
|
|
105
92
|
"docs:preview": "vitepress preview docs"
|
|
106
93
|
},
|
|
107
|
-
"version": "
|
|
94
|
+
"version": "3.0.0"
|
|
108
95
|
}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED