@rpcbase/client 0.369.0 → 0.370.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/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/notificationsRealtime.d.ts.map +1 -1
- package/dist/rts/index.d.ts +1 -0
- package/dist/rts/index.d.ts.map +1 -1
- package/dist/rts/index.js +1 -1
- package/dist/rts/modelTypes.d.ts +7 -0
- package/dist/rts/modelTypes.d.ts.map +1 -0
- package/dist/rts/useQuery.d.ts +3 -1
- package/dist/rts/useQuery.d.ts.map +1 -1
- package/dist/rts/wsClient.d.ts +2 -1
- package/dist/rts/wsClient.d.ts.map +1 -1
- package/dist/{useQuery-C2L-Rgat.js → useQuery-DnrhB9w2.js} +19 -7
- package/dist/useQuery-DnrhB9w2.js.map +1 -0
- package/package.json +1 -1
- package/dist/useQuery-C2L-Rgat.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getNavigationGuards, createRoutesFromElements, createBrowserRouter, Rou
|
|
|
5
5
|
import { hydrateRoot } from "react-dom/client";
|
|
6
6
|
import { r as reportClientException } from "./errorReporting-CVoUUKxW.js";
|
|
7
7
|
import { s } from "./errorReporting-CVoUUKxW.js";
|
|
8
|
-
import { m as useQuery } from "./useQuery-
|
|
8
|
+
import { m as useQuery } from "./useQuery-DnrhB9w2.js";
|
|
9
9
|
const emptyUnsubscribe = () => {
|
|
10
10
|
};
|
|
11
11
|
const useMediaQuery = (query) => {
|
|
@@ -2230,9 +2230,9 @@ function NotificationsRealtimeProvider({
|
|
|
2230
2230
|
const trimmedUserId = typeof userId === "string" ? userId.trim() : "";
|
|
2231
2231
|
const canUseRts = Boolean(trimmedUserId);
|
|
2232
2232
|
const settingsQuery = useQuery(
|
|
2233
|
-
|
|
2233
|
+
"RBNotificationSettings",
|
|
2234
2234
|
useMemo(() => canUseRts ? { userId: trimmedUserId } : {}, [canUseRts, trimmedUserId]),
|
|
2235
|
-
useMemo(() => ({ key: "rb.notifications.settings", limit: 1 }), [])
|
|
2235
|
+
useMemo(() => ({ key: "rb.notifications.settings", limit: 1, enabled: canUseRts }), [canUseRts])
|
|
2236
2236
|
);
|
|
2237
2237
|
const settings = settingsQuery.data?.[0] ?? null;
|
|
2238
2238
|
const disabledTopics = useMemo(() => buildDisabledTopics(settings), [settings]);
|
|
@@ -2248,13 +2248,14 @@ function NotificationsRealtimeProvider({
|
|
|
2248
2248
|
return base;
|
|
2249
2249
|
}, [canUseRts, disabledTopics, trimmedUserId]);
|
|
2250
2250
|
const notificationsQuery = useQuery(
|
|
2251
|
-
|
|
2251
|
+
"RBNotification",
|
|
2252
2252
|
query,
|
|
2253
2253
|
useMemo(() => ({
|
|
2254
2254
|
key: "rb.notifications",
|
|
2255
2255
|
sort: { createdAt: -1 },
|
|
2256
|
-
limit
|
|
2257
|
-
|
|
2256
|
+
limit,
|
|
2257
|
+
enabled: canUseRts
|
|
2258
|
+
}), [canUseRts, limit])
|
|
2258
2259
|
);
|
|
2259
2260
|
const notifications = useMemo(() => {
|
|
2260
2261
|
const raw = notificationsQuery.data;
|