Skip to content

Commit

Permalink
Merge pull request #152 from Azure-Samples/palatter/1.17.0-update
Browse files Browse the repository at this point in the history
Update to communication-react 1.17.0
  • Loading branch information
palatter authored Jun 10, 2024
2 parents 46b534e + 07557bf commit 1042d06
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@azure/communication-chat": "^1.5.0",
"@azure/communication-common": "^2.3.1",
"@azure/communication-identity": "^1.3.0",
"@azure/communication-react": "1.16.1",
"@azure/communication-react": "1.17.0",
"@azure/logger": "^1.0.4",
"@fluentui/react": "^8.115.2",
"@fluentui/react-file-type-icons": "8.11.4",
Expand Down
5 changes: 5 additions & 0 deletions Chat/src/app/ConfigurationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ export default (props: ConfigurationScreenProps): JSX.Element => {
return <Spinner label={spinnerLabel} ariaLive="assertive" labelPosition="top" />;
};

const richTextEditorToggle = (): JSX.Element => {
return <></>;
};

const displayJoinChatArea = (): JSX.Element => {
return (
<Stack
Expand Down Expand Up @@ -248,6 +252,7 @@ export default (props: ConfigurationScreenProps): JSX.Element => {
isEmpty={emptyWarning}
/>

{richTextEditorToggle()}
<PrimaryButton
disabled={disableJoinChatButton}
className={buttonStyle}
Expand Down
3 changes: 3 additions & 0 deletions Chat/src/app/RichTextEditorToggle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export {}; /*The above line is generated by conditional compilation, when no export detected after CC.*/
3 changes: 3 additions & 0 deletions Chat/src/app/utils/downloadHandler.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export {}; /*The above line is generated by conditional compilation, when no export detected after CC.*/
3 changes: 3 additions & 0 deletions Chat/src/app/utils/uploadHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export {}; /*The above line is generated by conditional compilation, when no export detected after CC.*/
15 changes: 0 additions & 15 deletions Chat/src/app/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,3 @@ export const getBackgroundColor = (avatar: string): { backgroundColor: string }
};
}
};

/**
* Init React Render Tracker whenever it detects the query param 'rrt' is set to true.
*/
export const initReactRenderTracker = (): void => {
const urlParams = new URLSearchParams(window.location.search);
const isEnabled = urlParams.get('rrt');
if (isEnabled !== 'true') {
return;
}

const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/react-render-tracker';
document.head.appendChild(script);
};
4 changes: 0 additions & 4 deletions Chat/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ import './index.css';
import App from './app/App';
import { SwitchableFluentThemeProvider } from './app/theming/SwitchableFluentThemeProvider';

import { initReactRenderTracker } from './app/utils/utils';

const domNode = document.getElementById('root');
if (!domNode) {
throw new Error('Failed to find the root element');
}

initReactRenderTracker();

createRoot(domNode).render(
<React.StrictMode>
<SwitchableFluentThemeProvider scopeId="SampleChatApp">
Expand Down

0 comments on commit 1042d06

Please sign in to comment.