quivr/frontend/app/chat/[chatId]/page.tsx
Mamadou DICKO 36fd146fed
feat: improve app ux (#1281)
* style: make FeedItemIcon the same size

* feat: update feed component brain selector label position

* style: change purple to 600

* feat: improve already dropped file message ux

* feat: autoclose feedinput on chatId change

* style: change chat colors

* feat: prevent linebreak in knowledge to upload row

* feat(textFIeld): avoid textfield content going under icon

* feat(knowledgeToUpload): add tooltip on urls and files name

* feat(feedBrain): auto scroll on messages when feed modal get opened

* style: update colors

* refactor: rename uploadCard to FeedCard
2023-09-29 10:24:31 +02:00

38 lines
1.4 KiB
TypeScript

"use client";
import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext";
import { useCustomDropzone } from "@/lib/hooks/useDropzone";
import { ActionsBar } from "./components/ActionsBar";
import { ChatDialogueArea } from "./components/ChatDialogueArea/ChatDialogue";
import { ChatHeader } from "./components/ChatHeader";
const SelectedChatPage = (): JSX.Element => {
const { getRootProps } = useCustomDropzone();
const { shouldDisplayFeedCard } = useKnowledgeToFeedContext();
return (
<main
className="flex flex-col w-full h-[calc(100vh-61px)] overflow-hidden"
data-testid="chat-page"
{...getRootProps()}
>
<section className="flex flex-col flex-1 items-center w-full h-full overflow-y-auto">
<ChatHeader />
<div
className={`flex-1 flex flex-col mt-4 md:mt-8 w-full shadow-md dark:shadow-primary/25 hover:shadow-xl transition-shadow rounded-xl overflow-hidden dark:bg-black border border-black/10 dark:border-white/25 p-2 md:p-12 pt-4 md:pt-10 ${
shouldDisplayFeedCard ? "bg-chat-bg-gray" : "bg-white"
}`}
>
<div className="flex flex-1 flex-col overflow-y-auto">
<ChatDialogueArea />
</div>
<ActionsBar />
</div>
</section>
</main>
);
};
export default SelectedChatPage;