refactor KefuChatShell component by removing unused host actions state and simplifying button rendering
This commit is contained in:
@@ -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,7 +261,6 @@ export function KefuChatShell() {
|
||||
>
|
||||
<RotateCwIcon className="size-4" />
|
||||
</Button>
|
||||
{showHostActions ? (
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
@@ -277,8 +272,6 @@ export function KefuChatShell() {
|
||||
>
|
||||
<MinusIcon className="size-4" />
|
||||
</Button>
|
||||
) : null}
|
||||
{showHostActions ? (
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
@@ -294,7 +287,6 @@ export function KefuChatShell() {
|
||||
<Maximize2Icon className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
) : null}
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
|
||||
Reference in New Issue
Block a user