chatbot debug

This commit is contained in:
hamid zarghami
2025-06-08 16:21:37 +03:30
parent 4ceb91466e
commit 9334e09ac6
14 changed files with 1585 additions and 3 deletions
+27
View File
@@ -0,0 +1,27 @@
import { FC, useState } from 'react';
import { MessageText1 } from 'iconsax-react';
import Chatbot from './Chatbot';
const ChatbotButton: FC = () => {
const [isChatbotOpen, setIsChatbotOpen] = useState<boolean>(false);
const toggleChatbot = () => {
setIsChatbotOpen(!isChatbotOpen);
};
return (
<>
<button
onClick={toggleChatbot}
className="fixed bottom-5 right-5 bg-blue-600 text-white rounded-full w-14 h-14 flex items-center justify-center shadow-lg hover:bg-blue-700 transition-colors z-40"
aria-label="چت با پشتیبانی"
>
<MessageText1 size={24} />
</button>
<Chatbot isOpen={isChatbotOpen} onClose={() => setIsChatbotOpen(false)} />
</>
);
};
export default ChatbotButton;