Skip to content

Commit d29476a

Browse files
committed
mobile responsive
1 parent 83dae1f commit d29476a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/chatbot/ChatBot.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export default function Chatbot() {
8484

8585
useEffect(() => {
8686
console.log("aiChatBot", flags["ai-chatbot"]);
87-
console.log(messages);
8887
}, [messages]);
8988

9089
const surveyResponseNotification = (surveyResponse: string) => {
@@ -100,7 +99,6 @@ export default function Chatbot() {
10099

101100
useEffect(() => {
102101
if (chatContentRef.current) {
103-
console.log(chatContentRef)
104102
chatContentRef.current.scrollTop = chatContentRef.current.scrollHeight;
105103
}
106104
}, [messages]);
@@ -118,10 +116,13 @@ export default function Chatbot() {
118116
<span className="sr-only">Open Chatbot</span>
119117
</Button>
120118
</div>
121-
119+
{/* "fixed top-[calc(50%-150px)] left-[calc(90%-100px)] transform -translate-x-1/2 z-50" */}
122120
{isOpen && (
123-
<div className="fixed top-[calc(50%-150px)] left-[calc(90%-100px)] transform -translate-x-1/2 z-50">
124-
<Card className="max-w-md w-[500px]">
121+
<div
122+
className="fixed inset-0 z-50 flex items-end justify-end p-4 sm:p-6 bottom-[50px]"
123+
onClick={() => setIsOpen((prevState) => !prevState)}
124+
>
125+
<Card className="w-full max-w-md">
125126
<CardHeader className="flex flex-row items-center">
126127
<div className="flex items-center space-x-4">
127128
<Avatar>

0 commit comments

Comments
 (0)