@@ -87,11 +87,11 @@ For this quickstart, we're modifying files inside of the `src` folder.
87
87
88
88
### Install the package
89
89
90
- Use the ` npm install ` command to install the beta Azure Communication Services UI Library for JavaScript.
90
+ Use the ` npm install ` command to install the latest beta Azure Communication Services UI Library for JavaScript.
91
91
92
92
``` bash
93
93
94
- npm install @azure/communication-react@1.16 .0-beta.1
94
+ npm install @azure/communication-react@1.28 .0-beta.2
95
95
96
96
```
97
97
@@ -100,8 +100,8 @@ you can most consistently use the API from the core libraries in your applicatio
100
100
101
101
``` bash
102
102
103
- npm install @azure/communication-calling@1.24 .1-beta.2
104
- npm install @azure/
[email protected] .
1
103
+ npm install @azure/communication-calling@1.36 .1-beta.1
104
+ npm install @azure/
[email protected] .
7
105
105
106
106
```
107
107
@@ -133,9 +133,9 @@ import {
133
133
} from ' @azure/communication-react' ;
134
134
import React , { useMemo } from ' react' ;
135
135
136
- initializeFileTypeIcons ();
137
-
138
136
function App(): JSX .Element {
137
+ initializeFileTypeIcons ();
138
+
139
139
// Common variables
140
140
const endpointUrl = ' INSERT_ENDPOINT_URL' ;
141
141
const userId = ' INSERT_USER_ID' ;
@@ -167,7 +167,7 @@ function App(): JSX.Element {
167
167
);
168
168
const chatAdapter = useAzureCommunicationChatAdapter (chatAdapterArgs );
169
169
170
- if (!! chatAdapter ) {
170
+ if (chatAdapter ) {
171
171
return (
172
172
<>
173
173
< div style = {containerStyle }>
@@ -219,6 +219,7 @@ const uploadFileToAzureBlob = async (uploadTask: AttachmentUploadTask) => {
219
219
return {
220
220
url: ' https://sample.com/sample.jpg' , // Download URL of the file.
221
221
};
222
+ }
222
223
223
224
```
224
225
@@ -290,6 +291,7 @@ const attachmentSelectionHandler: AttachmentSelectionHandler = async (uploadTask
290
291
// Allows you to provide a custom error message.
291
292
task .notifyUploadFailed (' File too big. Select a file under 99 MB.' );
292
293
}
294
+ ...
293
295
}
294
296
}
295
297
@@ -318,7 +320,8 @@ const handler = async (attachment: AttachmentMetadata, message?: ChatMessage) =>
318
320
};
319
321
320
322
const customHandler = = async (attachment : AttachmentMetadata , message ?: ChatMessage ) => {
321
- if (attachment .extension === " pdf" ) {
323
+ const extension = attachment .name .split (" ." ).pop () || " " ;
324
+ if (extension === " pdf" ) {
322
325
return [
323
326
{
324
327
title: " Custom button" ,
0 commit comments