Skip to content

Commit c984bbc

Browse files
v0.1.7
1 parent 193fba5 commit c984bbc

File tree

9 files changed

+342
-1747
lines changed

9 files changed

+342
-1747
lines changed

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,14 @@ In our example we show how to authenticate user with login and password.
8383

8484
```
8585
import * as QB from "quickblox/quickblox";
86-
import { QuickBloxUIKitProvider } from 'quickblox-ui-kit-react/dist/index-ui';
86+
import {
87+
QuickBloxUIKitProvider,
88+
qbDataContext,
89+
QuickBloxUIKitDesktopLayout,
90+
LoginData,
91+
AuthorizationData,
92+
QBDataContextType,
93+
} from 'quickblox-ui-kit-react/dist/index-ui';
8794
8895
var params = { login: "garry", password: "garry5santos" };
8996
@@ -92,13 +99,29 @@ QB.login(params, function(error, result) {
9299
} else {
93100
// Navigate User to the UIKit
94101
});
102+
103+
const qbUIKitContext: QBDataContextType = React.useContext(qbDataContext);
104+
```
105+
To order to config quickblox ui kit provider if you use SDK without session token:
106+
```
107+
<QuickBloxUIKitProvider
108+
maxFileSize={100 * 1000000} //set max size for attachments
109+
accountData={{ ...QBConfig.credentials }}
110+
loginData={{
111+
login: params.login,
112+
password: params.password,
113+
}}
114+
>
115+
<QuickBloxUIKitDesktopLayout /> // container for DesktopLayout
116+
</QuickBloxUIKitProvider>
95117
```
96-
To order to config quickblox ui kit provider
118+
To order to config quickblox ui kit provider if you use SDK with session token:
97119
```
98-
<QuickBloxUIKitProvider
99-
maxFileSize={100 * 1000000} //set max size for attachments
100-
>
101-
<Desktop> // container for DesktopLayout
120+
<QuickBloxUIKitProvider
121+
maxFileSize={100 * 1000000} //set max size for attachments
122+
accountData={{ ...QBConfig.credentials }} // sessionToken was used in QBConfig
123+
>
124+
<QuickBloxUIKitDesktopLayout /> // container for DesktopLayout
102125
</QuickBloxUIKitProvider>
103126
```
104127

@@ -269,7 +292,7 @@ and specify selected components:
269292
```
270293
# Sample
271294

272-
https://github.com/QuickBlox/quickblox-javascript-sdk/tree/gh-pages/samples/react-chat
295+
https://github.com/QuickBlox/quickblox-javascript-sdk/tree/gh-pages/samples/react-chat-ui-kit-init-sample
273296

274297
# License
275298
[](#license)

0 commit comments

Comments
 (0)