@liveblocks/react 1.6.0 → 1.7.1-pre1
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.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1142,11 +1142,7 @@ declare function useRoomContextBundle(): {
|
|
|
1142
1142
|
<T_5>(selector: (me: User<JsonObject, BaseUserMeta>) => T_5, isEqual?: ((prev: T_5, curr: T_5) => boolean) | undefined): T_5 | null;
|
|
1143
1143
|
};
|
|
1144
1144
|
useThreads: () => ThreadsState<BaseMetadata>;
|
|
1145
|
-
useUser: (userId: string) => UserState<
|
|
1146
|
-
[key: string]: Json | undefined;
|
|
1147
|
-
name?: string | undefined;
|
|
1148
|
-
avatar?: string | undefined;
|
|
1149
|
-
} | undefined>;
|
|
1145
|
+
useUser: (userId: string) => UserState<_liveblocks_core.IUserInfo | undefined>;
|
|
1150
1146
|
useList: <TKey extends string>(key: TKey) => _liveblocks_core.Lson | undefined;
|
|
1151
1147
|
useMap: <TKey_1 extends string>(key: TKey_1) => _liveblocks_core.Lson | undefined;
|
|
1152
1148
|
useObject: <TKey_2 extends string>(key: TKey_2) => _liveblocks_core.Lson | undefined;
|
|
@@ -1500,11 +1496,7 @@ declare function useRoomContextBundle(): {
|
|
|
1500
1496
|
<T_7>(selector: (me: User<JsonObject, BaseUserMeta>) => T_7, isEqual?: ((prev: T_7, curr: T_7) => boolean) | undefined): T_7;
|
|
1501
1497
|
};
|
|
1502
1498
|
useThreads: () => ThreadsStateSuccess<BaseMetadata>;
|
|
1503
|
-
useUser: (userId: string) => UserStateSuccess<
|
|
1504
|
-
[key: string]: Json | undefined;
|
|
1505
|
-
name?: string | undefined;
|
|
1506
|
-
avatar?: string | undefined;
|
|
1507
|
-
} | undefined>;
|
|
1499
|
+
useUser: (userId: string) => UserStateSuccess<_liveblocks_core.IUserInfo | undefined>;
|
|
1508
1500
|
useList: <TKey_3 extends string>(key: TKey_3) => _liveblocks_core.Lson | undefined;
|
|
1509
1501
|
useMap: <TKey_4 extends string>(key: TKey_4) => _liveblocks_core.Lson | undefined;
|
|
1510
1502
|
useObject: <TKey_5 extends string>(key: TKey_5) => _liveblocks_core.Lson | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1142,11 +1142,7 @@ declare function useRoomContextBundle(): {
|
|
|
1142
1142
|
<T_5>(selector: (me: User<JsonObject, BaseUserMeta>) => T_5, isEqual?: ((prev: T_5, curr: T_5) => boolean) | undefined): T_5 | null;
|
|
1143
1143
|
};
|
|
1144
1144
|
useThreads: () => ThreadsState<BaseMetadata>;
|
|
1145
|
-
useUser: (userId: string) => UserState<
|
|
1146
|
-
[key: string]: Json | undefined;
|
|
1147
|
-
name?: string | undefined;
|
|
1148
|
-
avatar?: string | undefined;
|
|
1149
|
-
} | undefined>;
|
|
1145
|
+
useUser: (userId: string) => UserState<_liveblocks_core.IUserInfo | undefined>;
|
|
1150
1146
|
useList: <TKey extends string>(key: TKey) => _liveblocks_core.Lson | undefined;
|
|
1151
1147
|
useMap: <TKey_1 extends string>(key: TKey_1) => _liveblocks_core.Lson | undefined;
|
|
1152
1148
|
useObject: <TKey_2 extends string>(key: TKey_2) => _liveblocks_core.Lson | undefined;
|
|
@@ -1500,11 +1496,7 @@ declare function useRoomContextBundle(): {
|
|
|
1500
1496
|
<T_7>(selector: (me: User<JsonObject, BaseUserMeta>) => T_7, isEqual?: ((prev: T_7, curr: T_7) => boolean) | undefined): T_7;
|
|
1501
1497
|
};
|
|
1502
1498
|
useThreads: () => ThreadsStateSuccess<BaseMetadata>;
|
|
1503
|
-
useUser: (userId: string) => UserStateSuccess<
|
|
1504
|
-
[key: string]: Json | undefined;
|
|
1505
|
-
name?: string | undefined;
|
|
1506
|
-
avatar?: string | undefined;
|
|
1507
|
-
} | undefined>;
|
|
1499
|
+
useUser: (userId: string) => UserStateSuccess<_liveblocks_core.IUserInfo | undefined>;
|
|
1508
1500
|
useList: <TKey_3 extends string>(key: TKey_3) => _liveblocks_core.Lson | undefined;
|
|
1509
1501
|
useMap: <TKey_4 extends string>(key: TKey_4) => _liveblocks_core.Lson | undefined;
|
|
1510
1502
|
useObject: <TKey_5 extends string>(key: TKey_5) => _liveblocks_core.Lson | undefined;
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _core = require('@liveblocks/core');
|
|
|
5
5
|
|
|
6
6
|
// src/version.ts
|
|
7
7
|
var PKG_NAME = "@liveblocks/react";
|
|
8
|
-
var PKG_VERSION = "1.
|
|
8
|
+
var PKG_VERSION = "1.7.1-pre1";
|
|
9
9
|
var PKG_FORMAT = "cjs";
|
|
10
10
|
|
|
11
11
|
// src/ClientSideSuspense.tsx
|
|
@@ -136,6 +136,14 @@ function createThreadsManager() {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
+
function handleCommentsApiError(err) {
|
|
140
|
+
const message = `Request failed with status ${err.status}: ${err.message}`;
|
|
141
|
+
if (_optionalChain([err, 'access', _ => _.details, 'optionalAccess', _2 => _2.error]) === "FORBIDDEN") {
|
|
142
|
+
const detailedMessage = [message, err.details.suggestion, err.details.docs].filter(Boolean).join("\n");
|
|
143
|
+
_core.console.error(detailedMessage);
|
|
144
|
+
}
|
|
145
|
+
return new Error(message);
|
|
146
|
+
}
|
|
139
147
|
function createCommentsRoom(room, errorEventSource) {
|
|
140
148
|
const manager = createThreadsManager();
|
|
141
149
|
let timestamp = 0;
|
|
@@ -242,8 +250,12 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
242
250
|
mutate(room.editThreadMetadata({ metadata, threadId }), {
|
|
243
251
|
optimisticData
|
|
244
252
|
}).catch((err) => {
|
|
253
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
254
|
+
throw err;
|
|
255
|
+
}
|
|
256
|
+
const error = handleCommentsApiError(err);
|
|
245
257
|
errorEventSource.notify(
|
|
246
|
-
new EditThreadMetadataError(
|
|
258
|
+
new EditThreadMetadataError(error, {
|
|
247
259
|
roomId: room.id,
|
|
248
260
|
threadId,
|
|
249
261
|
metadata
|
|
@@ -278,17 +290,21 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
278
290
|
};
|
|
279
291
|
mutate(room.createThread({ threadId, commentId, body, metadata }), {
|
|
280
292
|
optimisticData: [...threads, newThread]
|
|
281
|
-
}).catch(
|
|
282
|
-
(
|
|
283
|
-
|
|
293
|
+
}).catch((err) => {
|
|
294
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
295
|
+
throw err;
|
|
296
|
+
}
|
|
297
|
+
const error = handleCommentsApiError(err);
|
|
298
|
+
errorEventSource.notify(
|
|
299
|
+
new CreateThreadError(error, {
|
|
284
300
|
roomId: room.id,
|
|
285
301
|
threadId,
|
|
286
302
|
commentId,
|
|
287
303
|
body,
|
|
288
304
|
metadata
|
|
289
305
|
})
|
|
290
|
-
)
|
|
291
|
-
);
|
|
306
|
+
);
|
|
307
|
+
});
|
|
292
308
|
return newThread;
|
|
293
309
|
}
|
|
294
310
|
function createComment({
|
|
@@ -316,16 +332,20 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
316
332
|
);
|
|
317
333
|
mutate(room.createComment({ threadId, commentId, body }), {
|
|
318
334
|
optimisticData
|
|
319
|
-
}).catch(
|
|
320
|
-
(
|
|
321
|
-
|
|
335
|
+
}).catch((err) => {
|
|
336
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
337
|
+
throw err;
|
|
338
|
+
}
|
|
339
|
+
const error = handleCommentsApiError(err);
|
|
340
|
+
errorEventSource.notify(
|
|
341
|
+
new CreateCommentError(error, {
|
|
322
342
|
roomId: room.id,
|
|
323
343
|
threadId,
|
|
324
344
|
commentId,
|
|
325
345
|
body
|
|
326
346
|
})
|
|
327
|
-
)
|
|
328
|
-
);
|
|
347
|
+
);
|
|
348
|
+
});
|
|
329
349
|
return comment;
|
|
330
350
|
}
|
|
331
351
|
function editComment({ threadId, commentId, body }) {
|
|
@@ -345,16 +365,20 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
345
365
|
);
|
|
346
366
|
mutate(room.editComment({ threadId, commentId, body }), {
|
|
347
367
|
optimisticData
|
|
348
|
-
}).catch(
|
|
349
|
-
(
|
|
350
|
-
|
|
368
|
+
}).catch((err) => {
|
|
369
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
370
|
+
throw err;
|
|
371
|
+
}
|
|
372
|
+
const error = handleCommentsApiError(err);
|
|
373
|
+
errorEventSource.notify(
|
|
374
|
+
new EditCommentError(error, {
|
|
351
375
|
roomId: room.id,
|
|
352
376
|
threadId,
|
|
353
377
|
commentId,
|
|
354
378
|
body
|
|
355
379
|
})
|
|
356
|
-
)
|
|
357
|
-
);
|
|
380
|
+
);
|
|
381
|
+
});
|
|
358
382
|
}
|
|
359
383
|
function deleteComment({ threadId, commentId }) {
|
|
360
384
|
const threads = getThreads();
|
|
@@ -381,15 +405,19 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
381
405
|
}
|
|
382
406
|
mutate(room.deleteComment({ threadId, commentId }), {
|
|
383
407
|
optimisticData: newThreads
|
|
384
|
-
}).catch(
|
|
385
|
-
(
|
|
386
|
-
|
|
408
|
+
}).catch((err) => {
|
|
409
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
410
|
+
throw err;
|
|
411
|
+
}
|
|
412
|
+
const error = handleCommentsApiError(err);
|
|
413
|
+
errorEventSource.notify(
|
|
414
|
+
new DeleteCommentError(error, {
|
|
387
415
|
roomId: room.id,
|
|
388
416
|
threadId,
|
|
389
417
|
commentId
|
|
390
418
|
})
|
|
391
|
-
)
|
|
392
|
-
);
|
|
419
|
+
);
|
|
420
|
+
});
|
|
393
421
|
}
|
|
394
422
|
function getCurrentUserId() {
|
|
395
423
|
const self = room.getSelf();
|
|
@@ -419,7 +447,7 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
419
447
|
commentsEventRefCount = commentsEventRefCount - 1;
|
|
420
448
|
if (commentsEventRefCount > 0)
|
|
421
449
|
return;
|
|
422
|
-
_optionalChain([commentsEventDisposer, 'optionalCall',
|
|
450
|
+
_optionalChain([commentsEventDisposer, 'optionalCall', _3 => _3()]);
|
|
423
451
|
commentsEventDisposer = void 0;
|
|
424
452
|
};
|
|
425
453
|
}
|
|
@@ -527,8 +555,12 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
527
555
|
mutate(room.addReaction({ threadId, commentId, emoji }), {
|
|
528
556
|
optimisticData
|
|
529
557
|
}).catch((err) => {
|
|
558
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
559
|
+
throw err;
|
|
560
|
+
}
|
|
561
|
+
const error = handleCommentsApiError(err);
|
|
530
562
|
errorEventSource.notify(
|
|
531
|
-
new AddReactionError(
|
|
563
|
+
new AddReactionError(error, {
|
|
532
564
|
roomId: room.id,
|
|
533
565
|
threadId,
|
|
534
566
|
commentId,
|
|
@@ -580,8 +612,12 @@ function createCommentsRoom(room, errorEventSource) {
|
|
|
580
612
|
mutate(room.removeReaction({ threadId, commentId, emoji }), {
|
|
581
613
|
optimisticData
|
|
582
614
|
}).catch((err) => {
|
|
615
|
+
if (!(err instanceof _core.CommentsApiError)) {
|
|
616
|
+
throw err;
|
|
617
|
+
}
|
|
618
|
+
const error = handleCommentsApiError(err);
|
|
583
619
|
errorEventSource.notify(
|
|
584
|
-
new RemoveReactionError(
|
|
620
|
+
new RemoveReactionError(error, {
|
|
585
621
|
roomId: room.id,
|
|
586
622
|
threadId,
|
|
587
623
|
commentId,
|
|
@@ -656,14 +692,14 @@ function useAsyncCache(cache, key, options) {
|
|
|
656
692
|
return cacheItem2;
|
|
657
693
|
}, [cache, key]);
|
|
658
694
|
const subscribe = _react.useCallback.call(void 0,
|
|
659
|
-
(callback) => _nullishCoalesce(_optionalChain([cacheItem, 'optionalAccess',
|
|
695
|
+
(callback) => _nullishCoalesce(_optionalChain([cacheItem, 'optionalAccess', _4 => _4.subscribe, 'call', _5 => _5(callback)]), () => ( noop)),
|
|
660
696
|
[cacheItem]
|
|
661
697
|
);
|
|
662
698
|
const getState = _react.useCallback.call(void 0,
|
|
663
|
-
() => _nullishCoalesce(_optionalChain([cacheItem, 'optionalAccess',
|
|
699
|
+
() => _nullishCoalesce(_optionalChain([cacheItem, 'optionalAccess', _6 => _6.getState, 'call', _7 => _7()]), () => ( INITIAL_ASYNC_STATE)),
|
|
664
700
|
[cacheItem]
|
|
665
701
|
);
|
|
666
|
-
const revalidate = _react.useCallback.call(void 0, () => _optionalChain([cacheItem, 'optionalAccess',
|
|
702
|
+
const revalidate = _react.useCallback.call(void 0, () => _optionalChain([cacheItem, 'optionalAccess', _8 => _8.revalidate, 'call', _9 => _9()]), [cacheItem]);
|
|
667
703
|
const state = _indexjs.useSyncExternalStore.call(void 0, subscribe, getState, getState);
|
|
668
704
|
const previousData = _react.useRef.call(void 0, );
|
|
669
705
|
let data = state.data;
|
|
@@ -679,7 +715,7 @@ function useAsyncCache(cache, key, options) {
|
|
|
679
715
|
revalidate
|
|
680
716
|
};
|
|
681
717
|
}
|
|
682
|
-
if (_optionalChain([frozenOptions, 'optionalAccess',
|
|
718
|
+
if (_optionalChain([frozenOptions, 'optionalAccess', _10 => _10.suspense])) {
|
|
683
719
|
const error = getState().error;
|
|
684
720
|
if (error) {
|
|
685
721
|
throw error;
|
|
@@ -693,7 +729,7 @@ function useAsyncCache(cache, key, options) {
|
|
|
693
729
|
});
|
|
694
730
|
}
|
|
695
731
|
}
|
|
696
|
-
if (state.isLoading && _optionalChain([frozenOptions, 'optionalAccess',
|
|
732
|
+
if (state.isLoading && _optionalChain([frozenOptions, 'optionalAccess', _11 => _11.keepPreviousDataWhileLoading]) && typeof state.data === "undefined" && _optionalChain([previousData, 'access', _12 => _12.current, 'optionalAccess', _13 => _13.key]) !== key && typeof _optionalChain([previousData, 'access', _14 => _14.current, 'optionalAccess', _15 => _15.data]) !== "undefined") {
|
|
697
733
|
data = previousData.current.data;
|
|
698
734
|
}
|
|
699
735
|
return {
|
|
@@ -790,15 +826,6 @@ function warnIfNoResolveUsers(usersCache) {
|
|
|
790
826
|
hasWarnedIfNoResolveUsers = true;
|
|
791
827
|
}
|
|
792
828
|
}
|
|
793
|
-
var hasWarnedAboutCommentsBeta = false;
|
|
794
|
-
function warnIfBetaCommentsHook() {
|
|
795
|
-
if (!hasWarnedAboutCommentsBeta && process.env.NODE_ENV !== "production") {
|
|
796
|
-
console.warn(
|
|
797
|
-
"Comments is currently in private beta. Learn more at https://liveblocks.io/docs/products/comments."
|
|
798
|
-
);
|
|
799
|
-
hasWarnedAboutCommentsBeta = true;
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
829
|
var ContextBundle = React2.createContext(null);
|
|
803
830
|
function useRoomContextBundle() {
|
|
804
831
|
const bundle = React2.useContext(ContextBundle);
|
|
@@ -1098,7 +1125,7 @@ function createRoomContext(client, options) {
|
|
|
1098
1125
|
function onRootChange() {
|
|
1099
1126
|
const newValue = root.get(key);
|
|
1100
1127
|
if (newValue !== curr) {
|
|
1101
|
-
_optionalChain([unsubCurr, 'optionalCall',
|
|
1128
|
+
_optionalChain([unsubCurr, 'optionalCall', _16 => _16()]);
|
|
1102
1129
|
curr = newValue;
|
|
1103
1130
|
subscribeToCurr();
|
|
1104
1131
|
rerender();
|
|
@@ -1109,7 +1136,7 @@ function createRoomContext(client, options) {
|
|
|
1109
1136
|
const unsubscribeRoot = room.subscribe(root, onRootChange);
|
|
1110
1137
|
return () => {
|
|
1111
1138
|
unsubscribeRoot();
|
|
1112
|
-
_optionalChain([unsubCurr, 'optionalCall',
|
|
1139
|
+
_optionalChain([unsubCurr, 'optionalCall', _17 => _17()]);
|
|
1113
1140
|
};
|
|
1114
1141
|
}, [rootOrNull, room, key, rerender]);
|
|
1115
1142
|
if (rootOrNull === null) {
|
|
@@ -1245,23 +1272,14 @@ function createRoomContext(client, options) {
|
|
|
1245
1272
|
}
|
|
1246
1273
|
function useThreads() {
|
|
1247
1274
|
const room = useRoom();
|
|
1248
|
-
React2.useEffect(() => {
|
|
1249
|
-
warnIfBetaCommentsHook();
|
|
1250
|
-
}, []);
|
|
1251
1275
|
return getCommentsRoom(room).useThreads();
|
|
1252
1276
|
}
|
|
1253
1277
|
function useThreadsSuspense() {
|
|
1254
1278
|
const room = useRoom();
|
|
1255
|
-
React2.useEffect(() => {
|
|
1256
|
-
warnIfBetaCommentsHook();
|
|
1257
|
-
}, []);
|
|
1258
1279
|
return getCommentsRoom(room).useThreadsSuspense();
|
|
1259
1280
|
}
|
|
1260
1281
|
function useCreateThread() {
|
|
1261
1282
|
const room = useRoom();
|
|
1262
|
-
React2.useEffect(() => {
|
|
1263
|
-
warnIfBetaCommentsHook();
|
|
1264
|
-
}, []);
|
|
1265
1283
|
return React2.useCallback(
|
|
1266
1284
|
(options2) => getCommentsRoom(room).createThread(options2),
|
|
1267
1285
|
[room]
|
|
@@ -1269,9 +1287,6 @@ function createRoomContext(client, options) {
|
|
|
1269
1287
|
}
|
|
1270
1288
|
function useEditThreadMetadata() {
|
|
1271
1289
|
const room = useRoom();
|
|
1272
|
-
React2.useEffect(() => {
|
|
1273
|
-
warnIfBetaCommentsHook();
|
|
1274
|
-
}, []);
|
|
1275
1290
|
return React2.useCallback(
|
|
1276
1291
|
(options2) => getCommentsRoom(room).editThreadMetadata(options2),
|
|
1277
1292
|
[room]
|
|
@@ -1279,9 +1294,6 @@ function createRoomContext(client, options) {
|
|
|
1279
1294
|
}
|
|
1280
1295
|
function useAddReaction() {
|
|
1281
1296
|
const room = useRoom();
|
|
1282
|
-
React2.useEffect(() => {
|
|
1283
|
-
warnIfBetaCommentsHook();
|
|
1284
|
-
}, []);
|
|
1285
1297
|
return React2.useCallback(
|
|
1286
1298
|
(options2) => getCommentsRoom(room).addReaction(options2),
|
|
1287
1299
|
[room]
|
|
@@ -1289,9 +1301,6 @@ function createRoomContext(client, options) {
|
|
|
1289
1301
|
}
|
|
1290
1302
|
function useRemoveReaction() {
|
|
1291
1303
|
const room = useRoom();
|
|
1292
|
-
React2.useEffect(() => {
|
|
1293
|
-
warnIfBetaCommentsHook();
|
|
1294
|
-
}, []);
|
|
1295
1304
|
return React2.useCallback(
|
|
1296
1305
|
(options2) => getCommentsRoom(room).removeReaction(options2),
|
|
1297
1306
|
[room]
|
|
@@ -1299,9 +1308,6 @@ function createRoomContext(client, options) {
|
|
|
1299
1308
|
}
|
|
1300
1309
|
function useCreateComment() {
|
|
1301
1310
|
const room = useRoom();
|
|
1302
|
-
React2.useEffect(() => {
|
|
1303
|
-
warnIfBetaCommentsHook();
|
|
1304
|
-
}, []);
|
|
1305
1311
|
return React2.useCallback(
|
|
1306
1312
|
(options2) => getCommentsRoom(room).createComment(options2),
|
|
1307
1313
|
[room]
|
|
@@ -1309,9 +1315,6 @@ function createRoomContext(client, options) {
|
|
|
1309
1315
|
}
|
|
1310
1316
|
function useEditComment() {
|
|
1311
1317
|
const room = useRoom();
|
|
1312
|
-
React2.useEffect(() => {
|
|
1313
|
-
warnIfBetaCommentsHook();
|
|
1314
|
-
}, []);
|
|
1315
1318
|
return React2.useCallback(
|
|
1316
1319
|
(options2) => getCommentsRoom(room).editComment(options2),
|
|
1317
1320
|
[room]
|
|
@@ -1319,9 +1322,6 @@ function createRoomContext(client, options) {
|
|
|
1319
1322
|
}
|
|
1320
1323
|
function useDeleteComment() {
|
|
1321
1324
|
const room = useRoom();
|
|
1322
|
-
React2.useEffect(() => {
|
|
1323
|
-
warnIfBetaCommentsHook();
|
|
1324
|
-
}, []);
|
|
1325
1325
|
return React2.useCallback(
|
|
1326
1326
|
(options2) => getCommentsRoom(room).deleteComment(options2),
|
|
1327
1327
|
[room]
|
|
@@ -1332,7 +1332,7 @@ function createRoomContext(client, options) {
|
|
|
1332
1332
|
const users = await resolveUsers(
|
|
1333
1333
|
JSON.parse(stringifiedOptions)
|
|
1334
1334
|
);
|
|
1335
|
-
return _optionalChain([users, 'optionalAccess',
|
|
1335
|
+
return _optionalChain([users, 'optionalAccess', _18 => _18[0]]);
|
|
1336
1336
|
}) : void 0;
|
|
1337
1337
|
function useUser(userId) {
|
|
1338
1338
|
const room = useRoom();
|