From 19f3f6b757044e4f1ac1e6b312e23c059b165200 Mon Sep 17 00:00:00 2001 From: corlard3y Date: Mon, 27 May 2024 21:39:26 +0100 Subject: [PATCH] fix: update conditions --- .../sdk-frontend-react/src/app/ChatUITest/ChatPreview.tsx | 2 +- .../uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatPreview.tsx b/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatPreview.tsx index 7f278a75b..56047bc40 100644 --- a/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatPreview.tsx +++ b/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatPreview.tsx @@ -56,7 +56,7 @@ const ChatPreviewTest = () => { }, }} badge={{ count: 2 }} - selected={true} + selected={false} setSelected={console.log('Selected')} /> diff --git a/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx b/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx index 521e7f37e..1c3dbd8f4 100644 --- a/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx @@ -198,7 +198,7 @@ export const ChatPreview: React.FC = (options: IChatPreviewPr )} - {hasBadgeCount && !options?.selected && isBot && {options.badge?.count}} + {((hasBadgeCount || isBot) && !options?.selected) && {options.badge?.count}}