quivr/frontend/app/chat/components/ChatsList/index.tsx
Matthieu Jacq c140b9c517
feat: responsive sidebar (#1279)
* 💄 The chat sidebar takes the full height

* 💄 redesign of the action section and buttons in the sidebar

*  Sidebar header

* ♻️  Refact sidebar filesystem structure

* ♻️  Create a separate reusable sidebar component

* 🐛 Fix sidebar quick open/close on mobile

* 💄 New open/close sidebar button

* fix: error message + sidebar height issue + mobile width incoherence

* ♻️  Rename and move the sidebar footer

* 💄 sidebar toggle: color on hover

* apply sidebar to brains-management

* 💄 Larger sidebar

* 🚨Pass existing tests

*  Test the sidebar

*  Test the open and close buttons in the sidebar
2023-10-02 14:42:23 +02:00

25 lines
672 B
TypeScript

"use client";
import { Sidebar } from "@/lib/components/Sidebar/Sidebar";
import { ChatHistory } from "./components/ChatHistory";
import { NewChatButton } from "./components/NewChatButton";
import { useChatNotificationsSync } from "./hooks/useChatNotificationsSync";
import { useChatsList } from "./hooks/useChatsList";
export const ChatsList = (): JSX.Element => {
useChatsList();
useChatNotificationsSync();
return (
<Sidebar showFooter={true}>
<div className="flex flex-col flex-1 h-full" data-testid="chats-list">
<div className="pt-2">
<NewChatButton />
</div>
<ChatHistory />
</div>
</Sidebar>
);
};