react-query-firebase 3.3.2 → 3.3.3
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.
|
@@ -43,16 +43,19 @@ export const FirebaseContextProvider = ({ emulators, children, authEnabled = tru
|
|
|
43
43
|
...consentSettings
|
|
44
44
|
});
|
|
45
45
|
}, [consentSettings, internalFirebase]);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
initializeFirestore(internalFirebase, firestoreSettings || {});
|
|
48
|
+
}, [firestoreSettings, internalFirebase]);
|
|
46
49
|
const internalFirestore = useMemo(() => {
|
|
47
50
|
if (firestoreEnabled) {
|
|
48
51
|
if (emulators?.firestore?.host && emulators?.firestore?.port) {
|
|
49
52
|
connectFirestoreEmulator(getFirestore(internalFirebase), emulators.firestore.host, emulators.firestore.port);
|
|
50
53
|
}
|
|
51
|
-
const localFirestore =
|
|
54
|
+
const localFirestore = getFirestore(internalFirebase);
|
|
52
55
|
return localFirestore;
|
|
53
56
|
}
|
|
54
57
|
return null;
|
|
55
|
-
}, [emulators, firestoreEnabled, internalFirebase
|
|
58
|
+
}, [emulators, firestoreEnabled, internalFirebase]);
|
|
56
59
|
const internalAuth = useMemo(() => {
|
|
57
60
|
if (authEnabled) {
|
|
58
61
|
const localAuth = getAuth(internalFirebase);
|
|
@@ -89,7 +92,7 @@ export const FirebaseContextProvider = ({ emulators, children, authEnabled = tru
|
|
|
89
92
|
analytics: internalAnalytics,
|
|
90
93
|
firestore: internalFirestore,
|
|
91
94
|
remoteConfig: internalRemoteConfig,
|
|
92
|
-
|
|
95
|
+
messaging: getMessaging(internalFirebase)
|
|
93
96
|
}), [internalFirebase, internalAuth, internalAnalytics, internalFirestore, internalRemoteConfig]);
|
|
94
97
|
useEffect(() => {
|
|
95
98
|
if (contextValue.analytics) {
|
package/package.json
CHANGED