diff --git a/docusaurus.config.js b/docusaurus.config.js index 29f2b9e5..0c3e419a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -283,6 +283,14 @@ var _hmt = _hmt || []; src: "/js/clarity.js", async: true, }, + { + src: "https://tcdn.casibase.org/casibase.js", + async: true, + }, + { + src: "/js/casibase.js", + async: true, + }, ], presets: [ [ diff --git a/src/ChatWidget/ChatButton.jsx b/src/ChatWidget/ChatButton.jsx deleted file mode 100644 index c2574da8..00000000 --- a/src/ChatWidget/ChatButton.jsx +++ /dev/null @@ -1,84 +0,0 @@ -import React, {useEffect, useState} from "react"; -import { - chatButton, - chatButtonHover, - chatButtonOpen, - chatIframe, - chatIframeContainer, - chatIframeContainerOpen, - closeIcon -} from "./chatStyles"; - -function ChatButton() { - const [isChatOpen, setIsChatOpen] = useState(false); - const [isHovered, setIsHovered] = useState(false); - const [containerStyle, setContainerStyle] = useState(chatIframeContainer); - const [iconRotation, setIconRotation] = useState(0); - - useEffect(() => { - if (isChatOpen) { - setTimeout(() => { - setContainerStyle({...chatIframeContainer, ...chatIframeContainerOpen}); - }, 50); - setIconRotation(-90); - } else { - setContainerStyle(chatIframeContainer); - setIconRotation(0); - } - }, [isChatOpen]); - - const handleClick = () => { - setIsChatOpen(!isChatOpen); - }; - - return ( -
- -
-