From 15d0d81fa1aa271380ea9a4cf3f58d8513789f27 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Mon, 27 Apr 2026 14:52:14 +0800 Subject: [PATCH] refactor KefuChatShell component by removing unused host actions state and simplifying button rendering --- web/components/kefu/chat-shell.tsx | 60 +++++++++++++----------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/web/components/kefu/chat-shell.tsx b/web/components/kefu/chat-shell.tsx index 7a2dbbd..2aab1a0 100644 --- a/web/components/kefu/chat-shell.tsx +++ b/web/components/kefu/chat-shell.tsx @@ -75,7 +75,6 @@ export function KefuChatShell() { const [isMaximized, setIsMaximized] = useState(false) const [isCloseDialogOpen, setIsCloseDialogOpen] = useState(false) const [isClosingConversation, setIsClosingConversation] = useState(false) - const [showHostActions, setShowHostActions] = useState(false) const { title, @@ -142,9 +141,6 @@ export function KefuChatShell() { useEffect(() => { return bindKefuHostBridge({ - onInit: () => { - setShowHostActions(true) - }, onOpen: () => { setIsOpen(true) setIsVisible(true) @@ -265,36 +261,32 @@ export function KefuChatShell() { > - {showHostActions ? ( - - ) : null} - {showHostActions ? ( - - ) : null} + +