mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-21 02:11:35 +03:00
ee7af51c4d
# Description Epic: #1429 User Story: #1431 - Add an upgrade button in user settings. - Remove hover links on sidebar buttons (otherwise the link could partially hide the button) ## Screenshots (if appropriate): <img width="749" alt="image" src="https://github.com/StanGirard/quivr/assets/67386567/6265ba2b-8d91-4ee8-abb3-98417ad91076"> <img width="803" alt="image" src="https://github.com/StanGirard/quivr/assets/67386567/c13ce60b-a54d-44d7-a622-bcb1200ddb81">
33 lines
1005 B
TypeScript
33 lines
1005 B
TypeScript
"use client";
|
|
|
|
import { Sidebar } from "@/lib/components/Sidebar/Sidebar";
|
|
import { useOnboarding } from "@/lib/hooks/useOnboarding";
|
|
|
|
import { ChatHistory } from "./components/ChatHistory";
|
|
import { NewChatButton } from "./components/NewChatButton";
|
|
import { WelcomeChat } from "./components/WelcomeChat";
|
|
import { useChatNotificationsSync } from "./hooks/useChatNotificationsSync";
|
|
import { useChatsList } from "./hooks/useChatsList";
|
|
|
|
export const ChatsList = (): JSX.Element => {
|
|
useChatsList();
|
|
useChatNotificationsSync();
|
|
const { shouldDisplayWelcomeChat } = useOnboarding();
|
|
|
|
return (
|
|
<Sidebar showButtons={["myBrains", "upgradeToPlus", "user"]}>
|
|
<div className="flex flex-col flex-1 h-full" data-testid="chats-list">
|
|
<div className="pt-2">
|
|
<NewChatButton />
|
|
</div>
|
|
{shouldDisplayWelcomeChat && (
|
|
<div className="pt-2">
|
|
<WelcomeChat />
|
|
</div>
|
|
)}
|
|
<ChatHistory />
|
|
</div>
|
|
</Sidebar>
|
|
);
|
|
};
|