quivr/frontend/app/chat/[chatId]/page.tsx
Mamadou DICKO 7a2450eaf4
[ShareableBrain]: improve UX, fix minors bugs, refactor (#695)
* feat: add empty access list message

* feat: set default role to viewer

* feat: reset user invitation form after submit

* feat: add removing access indicator

* feat: add brain name on invitation page

* feat: display brain name on chat page

* feat: clear localStorage on logout
2023-07-18 18:28:44 +02:00

33 lines
1.0 KiB
TypeScript

"use client";
import PageHeading from "@/lib/components/ui/PageHeading";
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
import { ChatProvider } from "@/lib/context/ChatProvider";
import { ChatInput, ChatMessages } from "./components";
const SelectedChatPage = (): JSX.Element => {
const { currentBrain } = useBrainContext();
return (
<main className="flex flex-col w-full pt-10" data-testid="chat-page">
<section className="flex flex-col flex-1 items-center w-full h-full min-h-[70vh]">
<PageHeading
title={`Chat with ${currentBrain?.name ?? ""}`}
subtitle="Talk to a language model about your uploaded data"
/>
<ChatProvider>
<div className="relative w-full flex flex-col flex-1 items-center">
<div className="flex-1 w-full flex flex-col items-center">
<ChatMessages />
</div>
<ChatInput />
</div>
</ChatProvider>
</section>
</main>
);
};
export default SelectedChatPage;