Skip to content

Commit

Permalink
Merge pull request #12 from sendbird/feat/AC-200/apply-init-params
Browse files Browse the repository at this point in the history
feat: apply appStateToggleEnabled init param
  • Loading branch information
AhyoungRyu authored Jul 21, 2023
2 parents 03f68d6 + fdf283a commit 5e6bf3e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@sendbird/chat": "^4.9.3",
"@sendbird/uikit-react": "^3.6.4",
"@sendbird/uikit-react": "3.6.5",
"dompurify": "^3.0.4",
"polished": "^2.3.1",
"react-code-blocks": "^0.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/components/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SBConnectionStateProvider, {
useSbConnectionState,
} from '../context/SBConnectionContext';
import { assert } from '../utils';
import { useMemo } from 'react';

const SBComponent = () => {
const { applicationId, botId, userNickName } = useConstantState();
Expand All @@ -19,6 +20,9 @@ const SBComponent = () => {
'applicationId and botId must be provided'
);
const { sbConnectionStatus } = useSbConnectionState();
const sdkInitParams = useMemo(() => ({
appStateToggleEnabled: false,
}), []);

// Until the user sends a first message,
// we will display a fake channel UI not to establish a connection to Sendbird Chat SDK
Expand All @@ -36,6 +40,7 @@ const SBComponent = () => {
nickname={userNickName}
customApiHost={`https://api-${applicationId}.sendbird.com`}
customWebSocketHost={`wss://ws-${applicationId}.sendbird.com`}
sdkInitParams={sdkInitParams}
>
<>
<CustomChannel />
Expand Down

0 comments on commit 5e6bf3e

Please sign in to comment.