From fdf283a8b7d2a121d1ec01092d59b7e39b55127a Mon Sep 17 00:00:00 2001 From: Irene Ryu Date: Fri, 21 Jul 2023 15:32:50 +0900 Subject: [PATCH] feat: apply appStateToggleEnabled init param --- package-lock.json | 8 ++++---- package.json | 2 +- src/components/Chat.tsx | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4498f611..3150c7fed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.1", "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", @@ -1032,9 +1032,9 @@ } }, "node_modules/@sendbird/uikit-react": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/@sendbird/uikit-react/-/uikit-react-3.6.4.tgz", - "integrity": "sha512-ijThkIvWBl8IgEyPqIMEwK71pJxxIV8rwxYiZTJIZV4YdfHKcrxZ64rOVlU4wiP7Rx6oc++gwpmiYcWlhjZx+A==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/@sendbird/uikit-react/-/uikit-react-3.6.5.tgz", + "integrity": "sha512-5SCy8xklAGDEepG7wcJ/uU2meXPUV4w2cprG4bsX7T+vE09AuI9BDlXwa4lCesuK3l6cH88r8YIaCfJ9ZRqqeQ==", "dependencies": { "@sendbird/chat": "^4.9.2", "@sendbird/uikit-tools": "0.0.1-alpha.40", diff --git a/package.json b/package.json index aa67128d0..dca6532b2 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 17e648ca0..cf95d5e24 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -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(); @@ -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 @@ -36,6 +40,7 @@ const SBComponent = () => { nickname={userNickName} customApiHost={`https://api-${applicationId}.sendbird.com`} customWebSocketHost={`wss://ws-${applicationId}.sendbird.com`} + sdkInitParams={sdkInitParams} > <>