diff --git a/frontend/app/chat/[chatId]/page.tsx b/frontend/app/chat/[chatId]/page.tsx index 79636bc61..1e88f8133 100644 --- a/frontend/app/chat/[chatId]/page.tsx +++ b/frontend/app/chat/[chatId]/page.tsx @@ -9,7 +9,7 @@ import { ChatProvider } from "./context/ChatContext"; export default function ChatPage() { return (
-
+
{ return (
diff --git a/frontend/app/chat/components/ChatsList/index.tsx b/frontend/app/chat/components/ChatsList/index.tsx index 8448dc322..ca8785f1f 100644 --- a/frontend/app/chat/components/ChatsList/index.tsx +++ b/frontend/app/chat/components/ChatsList/index.tsx @@ -26,7 +26,7 @@ export const ChatsList = (): JSX.Element => { setOpen(false); } }} - className="lg:sticky fixed top-0 left-0 bottom-0 overflow-visible z-30 border-r border-black/10 dark:border-white/25 bg-white dark:bg-black" + className="flex flex-col lg:sticky fixed top-16 left-0 bottom-0 lg:h-[90vh] overflow-visible z-30 border-r border-black/10 dark:border-white/25 bg-white dark:bg-black" > { ? "10px 10px 16px rgba(0, 0, 0, 0)" : "10px 10px 16px rgba(0, 0, 0, 0.5)", }} - className={cn("overflow-hidden")} + className={cn("overflow-hidden flex flex-col flex-1")} > -
+
-
+
{allChats.map((chat) => ( { return ( -
+
{children}
diff --git a/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx b/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx index 925af5e5e..c2da2ce18 100644 --- a/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx +++ b/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx @@ -3,9 +3,12 @@ import { useEffect, useRef, useState } from "react"; import { FaBrain } from "react-icons/fa"; import { IoMdAdd } from "react-icons/io"; +import Button from "@/lib/components/ui/Button"; +import Field from "@/lib/components/ui/Field"; import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext"; import { useEventTracking } from "@/services/analytics/useEventTracking"; - +import { AnimatePresence, motion } from "framer-motion"; +import { MdCheck } from "react-icons/md"; export const BrainsDropDown = (): JSX.Element => { const [showDropdown, setShowDropdown] = useState(false); @@ -17,7 +20,7 @@ export const BrainsDropDown = (): JSX.Element => { const toggleDropdown = () => { setShowDropdown((prevState) => !prevState); - void track("SHOW_BRAINS_DROPDOWN") + void track("SHOW_BRAINS_DROPDOWN"); }; const handleCreateBrain = () => { @@ -27,7 +30,7 @@ export const BrainsDropDown = (): JSX.Element => { void createBrain(newBrainName); setNewBrainName(""); // Reset the new brain name input - void track("BRAIN_CREATED") + void track("BRAIN_CREATED"); }; const handleClickOutside = (event: MouseEvent) => { @@ -40,9 +43,9 @@ export const BrainsDropDown = (): JSX.Element => { }; const changeBrains = (value: string) => { - void track("CHANGE_BRAIN") - setNewBrainName(value) - } + void track("CHANGE_BRAIN"); + setNewBrainName(value); + }; useEffect(() => { document.addEventListener("mousedown", handleClickOutside); @@ -63,42 +66,58 @@ export const BrainsDropDown = (): JSX.Element => { > - {showDropdown && ( -
- {/* Option to create a new brain */} -
-
- changeBrains(e.target.value)} - className="flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:outline-none" - /> - -
-
- {/* List of brains */} - {allBrains.map((brain) => ( - - ))} -
- )} + changeBrains(e.target.value)} + /> + + +
+ {/* List of brains */} + {allBrains.map((brain) => ( + + ))} +
+ + )} +
);