2023-06-11 00:59:16 +03:00
|
|
|
"use client";
|
2023-06-15 12:52:46 +03:00
|
|
|
|
2023-09-29 11:24:31 +03:00
|
|
|
import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext";
|
2023-09-28 12:29:55 +03:00
|
|
|
import { useCustomDropzone } from "@/lib/hooks/useDropzone";
|
|
|
|
|
2023-08-11 11:06:20 +03:00
|
|
|
import { ActionsBar } from "./components/ActionsBar";
|
2023-09-12 18:44:15 +03:00
|
|
|
import { ChatDialogueArea } from "./components/ChatDialogueArea/ChatDialogue";
|
2023-06-11 00:59:16 +03:00
|
|
|
|
2023-07-05 19:33:18 +03:00
|
|
|
const SelectedChatPage = (): JSX.Element => {
|
2023-09-28 12:29:55 +03:00
|
|
|
const { getRootProps } = useCustomDropzone();
|
2023-09-29 11:24:31 +03:00
|
|
|
const { shouldDisplayFeedCard } = useKnowledgeToFeedContext();
|
2023-09-27 16:39:04 +03:00
|
|
|
|
2023-06-11 00:59:16 +03:00
|
|
|
return (
|
2023-10-03 13:18:49 +03:00
|
|
|
<div
|
|
|
|
className={`flex flex-col flex-1 items-center justify-stretch w-full h-[100vh] overflow-hidden ${
|
|
|
|
shouldDisplayFeedCard ? "bg-chat-bg-gray" : "bg-white"
|
|
|
|
} dark:bg-black transition-colors ease-out duration-500`}
|
2023-09-26 19:41:02 +03:00
|
|
|
data-testid="chat-page"
|
2023-09-28 12:29:55 +03:00
|
|
|
{...getRootProps()}
|
2023-09-26 19:41:02 +03:00
|
|
|
>
|
2023-09-27 16:39:04 +03:00
|
|
|
<div
|
2023-10-03 13:18:49 +03:00
|
|
|
className={`flex flex-col flex-1 w-full max-w-5xl h-full dark:shadow-primary/25 overflow-hidden p-2 sm:p-4 md:p-6 lg:p-8`}
|
2023-09-27 16:39:04 +03:00
|
|
|
>
|
2023-09-26 19:41:02 +03:00
|
|
|
<div className="flex flex-1 flex-col overflow-y-auto">
|
|
|
|
<ChatDialogueArea />
|
|
|
|
</div>
|
2023-09-29 11:24:31 +03:00
|
|
|
<ActionsBar />
|
2023-08-11 11:06:20 +03:00
|
|
|
</div>
|
2023-10-03 13:18:49 +03:00
|
|
|
</div>
|
2023-06-11 00:59:16 +03:00
|
|
|
);
|
2023-07-05 10:30:22 +03:00
|
|
|
};
|
|
|
|
|
2023-07-05 19:33:18 +03:00
|
|
|
export default SelectedChatPage;
|