From a6e5dcaadcd921c93050ce031d2be3e56909ea17 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 28 Jun 2023 00:44:48 -0300 Subject: [PATCH] Deleted chat modal and changed disposition of clearChat button --- .../src/modals/chatModal/chatInput/index.tsx | 78 ---- .../chatModal/chatMessage/codeBlock/index.tsx | 82 ---- .../modals/chatModal/chatMessage/index.tsx | 166 ------- .../modals/chatModal/fileComponent/index.tsx | 79 ---- src/frontend/src/modals/chatModal/index.tsx | 415 ------------------ .../src/modals/formModal/chatInput/index.tsx | 13 +- .../modals/formModal/chatMessage/index.tsx | 2 +- src/frontend/src/modals/formModal/index.tsx | 6 +- 8 files changed, 5 insertions(+), 836 deletions(-) delete mode 100644 src/frontend/src/modals/chatModal/chatInput/index.tsx delete mode 100644 src/frontend/src/modals/chatModal/chatMessage/codeBlock/index.tsx delete mode 100644 src/frontend/src/modals/chatModal/chatMessage/index.tsx delete mode 100644 src/frontend/src/modals/chatModal/fileComponent/index.tsx delete mode 100644 src/frontend/src/modals/chatModal/index.tsx diff --git a/src/frontend/src/modals/chatModal/chatInput/index.tsx b/src/frontend/src/modals/chatModal/chatInput/index.tsx deleted file mode 100644 index 69d382748..000000000 --- a/src/frontend/src/modals/chatModal/chatInput/index.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { classNames } from "../../../utils"; -import { useContext, useEffect, useRef, useState } from "react"; -import { TabsContext } from "../../../contexts/tabsContext"; -import { INPUT_STYLE } from "../../../constants"; -import { Lock, Send } from "lucide-react"; - -export default function ChatInput({ - lockChat, - chatValue, - sendMessage, - setChatValue, - inputRef, -}) { - useEffect(() => { - if (!lockChat && inputRef.current) { - inputRef.current.focus(); - } - }, [lockChat, inputRef]); - - useEffect(() => { - if (inputRef.current) { - inputRef.current.style.height = "inherit"; // Reset the height - inputRef.current.style.height = `${inputRef.current.scrollHeight}px`; // Set it to the scrollHeight - } - }, [chatValue]); - - return ( -
-