Skip to content

Commit 7c06976

Browse files
Fixing docgen issue
1 parent 1379632 commit 7c06976

File tree

6 files changed

+64
-32
lines changed

6 files changed

+64
-32
lines changed

docs/build/bundle.53b76c3b.js renamed to docs/build/bundle.13de61e4.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/build/bundle.53b76c3b.js.LICENSE.txt renamed to docs/build/bundle.13de61e4.js.LICENSE.txt

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350

351351
/*! exports provided: name, description, homepage, main, version, engines, directories, files, maintainers, repository, devDependencies, license, scripts, dependencies, default */
352352

353-
/*! exports provided: name, version, description, author, homepage, typings, main, module, jsnext:main, style, jsdelivr, keywords, dependencies, peerDependencies, files, devDependencies, husky, scripts, stylelint, browserslist, default */
353+
/*! exports provided: name, version, description, author, homepage, typings, main, module, jsnext:main, style, jsdelivr, keywords, dependencies, peerDependencies, files, devDependencies, husky, scripts, stylelint, resolutions, browserslist, default */
354354

355355
/*! exports provided: nonPassive */
356356

@@ -1364,6 +1364,10 @@
13641364
!*** ./src/context/TranslationContext.js ***!
13651365
\*******************************************/
13661366

1367+
/*!********************************************!*\
1368+
!*** ../stream-chat-js/dist/browser.es.js ***!
1369+
\********************************************/
1370+
13671371
/*!********************************************!*\
13681372
!*** ./node_modules/axios/lib/defaults.js ***!
13691373
\********************************************/
@@ -2700,10 +2704,6 @@
27002704
!*** ./node_modules/remark-parse/lib/locate/url.js ***!
27012705
\*****************************************************/
27022706

2703-
/*!*****************************************************!*\
2704-
!*** ./node_modules/stream-chat/dist/browser.es.js ***!
2705-
\*****************************************************/
2706-
27072707
/*!*****************************************************!*\
27082708
!*** ./node_modules/use-sidecar/dist/es2015/env.js ***!
27092709
\*****************************************************/
@@ -7024,6 +7024,10 @@
70247024
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/slots/UsageTabButton.js ***!
70257025
\*******************************************************************************************/
70267026

7027+
/*!*******************************************************************************************!*\
7028+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/Chat.md ***!
7029+
\*******************************************************************************************/
7030+
70277031
/*!*******************************************************************************************!*\
70287032
!*** ./node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Modifier_Base.js ***!
70297033
\*******************************************************************************************/
@@ -7148,6 +7152,10 @@
71487152
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/Welcome/WelcomeRenderer.js ***!
71497153
\**********************************************************************************************/
71507154

7155+
/*!**********************************************************************************************!*\
7156+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/Message.md ***!
7157+
\**********************************************************************************************/
7158+
71517159
/*!**********************************************************************************************!*\
71527160
!*** ./node_modules/regenerate-unicode-properties/General_Category/Connector_Punctuation.js ***!
71537161
\**********************************************************************************************/
@@ -7268,6 +7276,10 @@
72687276
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageList.md ***!
72697277
\**************************************************************************************************/
72707278

7279+
/*!**************************************************************************************************!*\
7280+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageTeam.md ***!
7281+
\**************************************************************************************************/
7282+
72717283
/*!**************************************************************************************************!*\
72727284
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/useUserRole.md ***!
72737285
\**************************************************************************************************/
@@ -7308,10 +7320,18 @@
73087320
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/StyleGuide/StyleGuideRenderer.js ***!
73097321
\****************************************************************************************************/
73107322

7323+
/*!****************************************************************************************************!*\
7324+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelHeader.md ***!
7325+
\****************************************************************************************************/
7326+
73117327
/*!****************************************************************************************************!*\
73127328
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/DateSeparator.md ***!
73137329
\****************************************************************************************************/
73147330

7331+
/*!****************************************************************************************************!*\
7332+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageSimple.md ***!
7333+
\****************************************************************************************************/
7334+
73157335
/*!****************************************************************************************************!*\
73167336
!*** ./node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_NFKC_Casefolded.js ***!
73177337
\****************************************************************************************************/
@@ -7408,6 +7428,10 @@
74087428
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/AttachmentActions.md ***!
74097429
\********************************************************************************************************/
74107430

7431+
/*!********************************************************************************************************!*\
7432+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageLivestream.md ***!
7433+
\********************************************************************************************************/
7434+
74117435
/*!*********************************************************************************************************!*\
74127436
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/Markdown/Checkbox/CheckboxRenderer.js ***!
74137437
\*********************************************************************************************************/
@@ -7464,10 +7488,18 @@
74647488
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/SectionHeading/SectionHeadingRenderer.js ***!
74657489
\************************************************************************************************************/
74667490

7491+
/*!************************************************************************************************************!*\
7492+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelPreviewCompact.md ***!
7493+
\************************************************************************************************************/
7494+
74677495
/*!*************************************************************************************************************!*\
74687496
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/Markdown/Blockquote/BlockquoteRenderer.js ***!
74697497
\*************************************************************************************************************/
74707498

7499+
/*!*************************************************************************************************************!*\
7500+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/VirtualizedMessageList.md ***!
7501+
\*************************************************************************************************************/
7502+
74717503
/*!*************************************************************************************************************!*\
74727504
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/Message/MessageTeam.js ***!
74737505
\*************************************************************************************************************/
@@ -7484,6 +7516,10 @@
74847516
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/TableOfContents/TableOfContentsRenderer.js ***!
74857517
\**************************************************************************************************************/
74867518

7519+
/*!**************************************************************************************************************!*\
7520+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelPreviewMessenger.md ***!
7521+
\**************************************************************************************************************/
7522+
74877523
/*!***************************************************************************************************************!*\
74887524
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/Attachment/Attachment.js ***!
74897525
\***************************************************************************************************************/
@@ -7492,6 +7528,10 @@
74927528
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/Message/MessageSimple.js ***!
74937529
\***************************************************************************************************************/
74947530

7531+
/*!****************************************************************************************************************!*\
7532+
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelPreviewLastMessage.md ***!
7533+
\****************************************************************************************************************/
7534+
74957535
/*!*****************************************************************************************************************!*\
74967536
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/ChannelList/ChannelList.js ***!
74977537
\*****************************************************************************************************************/

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
</head>
1010
<body>
1111
<div id="rsg-root"></div>
12-
<script src="build/bundle.53b76c3b.js"></script>
12+
<script src="build/bundle.13de61e4.js"></script>
1313
</body>
1414
</html>

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@
181181
"block-no-empty": null
182182
}
183183
},
184+
"resolutions": {
185+
"ast-types": "^0.14.0"
186+
},
184187
"browserslist": [
185188
">0.2%",
186189
"not ie <= 11",

src/components/Chat/Chat.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,22 @@ const Chat = ({
5252
const clientMutes = client?.user?.mutes;
5353

5454
useEffect(() => {
55-
const userAgent = client.getUserAgent();
56-
if (!userAgent.includes('stream-chat-react')) {
57-
// should result in something like:
58-
// 'stream-chat-react-2.3.2-stream-chat-javascript-client-browser-2.2.2'
59-
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
55+
const setUserAgent = () => {
56+
const userAgent = client.getUserAgent();
57+
if (!userAgent.includes('stream-chat-react')) {
58+
// should result in something like:
59+
// 'stream-chat-react-2.3.2-stream-chat-javascript-client-browser-2.2.2'
60+
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
61+
}
62+
};
63+
64+
if (client) {
65+
setUserAgent();
6066
}
6167
// don't want client in dep array because it is a required
6268
// prop for this component and we only want this run on mount
6369
// eslint-disable-next-line react-hooks/exhaustive-deps
64-
}, []);
70+
}, [client]);
6571

6672
useEffect(() => {
6773
setMutes(clientMutes || []);

yarn.lock

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,30 +2384,13 @@ ast-types-flow@^0.0.7:
23842384
resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"
23852385
integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0=
23862386

2387-
2388-
version "0.13.3"
2389-
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.3.tgz#50da3f28d17bdbc7969a3a2d83a0e4a72ae755a7"
2390-
integrity sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA==
2391-
2392-
2387+
[email protected], [email protected], ast-types@^0.13.2, ast-types@^0.14.0, ast-types@^0.7.2, ast-types@~0.13.2:
23932388
version "0.14.2"
23942389
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd"
23952390
integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==
23962391
dependencies:
23972392
tslib "^2.0.1"
23982393

2399-
ast-types@^0.13.2, ast-types@~0.13.2:
2400-
version "0.13.4"
2401-
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782"
2402-
integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==
2403-
dependencies:
2404-
tslib "^2.0.1"
2405-
2406-
ast-types@^0.7.2:
2407-
version "0.7.8"
2408-
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.7.8.tgz#902d2e0d60d071bdcd46dc115e1809ed11c138a9"
2409-
integrity sha1-kC0uDWDQcb3NRtwRXhgJ7RHBOKk=
2410-
24112394
astral-regex@^1.0.0:
24122395
version "1.0.0"
24132396
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"

0 commit comments

Comments
 (0)