diff --git a/components/ChatView/Header.tsx b/components/ChatView/Header.tsx index 1276cb8..863afc5 100644 --- a/components/ChatView/Header.tsx +++ b/components/ChatView/Header.tsx @@ -12,15 +12,18 @@ const Header = () => { }, [title]); return ( -
-
- +
+
+ + {title}
- {title} -
+ {title} +
Crafted by diff --git a/components/ChatView/index.tsx b/components/ChatView/index.tsx index a4d3fbc..93535b2 100644 --- a/components/ChatView/index.tsx +++ b/components/ChatView/index.tsx @@ -110,7 +110,10 @@ const ChatView = () => { }; return ( -
+
{messageList.length === 0 ? ( diff --git a/components/ConnectionSidebar.tsx b/components/ConnectionSidebar.tsx index f0bdfb5..e0af815 100644 --- a/components/ConnectionSidebar.tsx +++ b/components/ConnectionSidebar.tsx @@ -1,8 +1,8 @@ import { head } from "lodash-es"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { createPortal } from "react-dom"; -import { useChatStore, useConnectionStore } from "@/store"; -import { Connection } from "@/types"; +import { useChatStore, useConnectionStore, useLayoutStore } from "@/store"; +import { Chat, Connection } from "@/types"; import Icon from "./Icon"; import EngineIcon from "./EngineIcon"; import CreateConnectionModal from "./CreateConnectionModal"; @@ -14,6 +14,7 @@ interface State { } const ConnectionSidebar = () => { + const layoutStore = useLayoutStore(); const connectionStore = useConnectionStore(); const chatStore = useChatStore(); const [state, setState] = useState({ @@ -65,88 +66,96 @@ const ConnectionSidebar = () => { } }; + const handleChatSelect = (chat: Chat) => { + chatStore.setCurrentChat(chat); + layoutStore.toggleSidebar(false); + }; + return ( <> -