🐛 fix(chatTrigger): update className condition to disable chat trigger button when isBuilt is false or canOpen is false
This commit is contained in:
parent
9f24f7830c
commit
100419833f
1 changed files with 2 additions and 2 deletions
|
|
@ -46,14 +46,14 @@ export default function ChatTrigger({ open, setOpen, isBuilt, canOpen }) {
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
className={
|
className={
|
||||||
"shadow-round-btn-shadow hover:shadow-round-btn-shadow fixed bottom-4 right-4 flex h-12 w-12 items-center justify-center rounded-full bg-border px-3 py-1 shadow-md transition-all " +
|
"shadow-round-btn-shadow hover:shadow-round-btn-shadow fixed bottom-4 right-4 flex h-12 w-12 items-center justify-center rounded-full bg-border px-3 py-1 shadow-md transition-all " +
|
||||||
(!isBuilt ? "cursor-not-allowed" : "cursor-pointer")
|
(!isBuilt || !canOpen ? "cursor-not-allowed" : "cursor-pointer")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
<MessagesSquare
|
<MessagesSquare
|
||||||
className={
|
className={
|
||||||
"h-6 w-6 transition-all " +
|
"h-6 w-6 transition-all " +
|
||||||
(isBuilt
|
(isBuilt && canOpen
|
||||||
? "fill-chat-trigger stroke-chat-trigger stroke-1"
|
? "fill-chat-trigger stroke-chat-trigger stroke-1"
|
||||||
: "fill-chat-trigger-disabled stroke-chat-trigger-disabled stroke-1")
|
: "fill-chat-trigger-disabled stroke-chat-trigger-disabled stroke-1")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue