2023-06-11 00:59:16 +03:00
|
|
|
"use client";
|
2023-06-15 12:52:46 +03:00
|
|
|
|
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-08-11 11:06:20 +03:00
|
|
|
import { ChatHeader } from "./components/ChatHeader";
|
2023-09-27 16:39:04 +03:00
|
|
|
import { useSelectedChatPage } from "./hooks/useSelectedChatPage";
|
2023-06-11 00:59:16 +03:00
|
|
|
|
2023-07-05 19:33:18 +03:00
|
|
|
const SelectedChatPage = (): JSX.Element => {
|
2023-09-27 16:39:04 +03:00
|
|
|
const { setShouldDisplayUploadCard, shouldDisplayUploadCard } =
|
|
|
|
useSelectedChatPage();
|
|
|
|
|
2023-06-11 00:59:16 +03:00
|
|
|
return (
|
2023-09-26 19:41:02 +03:00
|
|
|
<main
|
|
|
|
className="flex flex-col w-full h-[calc(100vh-61px)] overflow-hidden"
|
|
|
|
data-testid="chat-page"
|
|
|
|
>
|
|
|
|
<section className="flex flex-col flex-1 items-center w-full h-full overflow-y-auto">
|
|
|
|
<ChatHeader />
|
2023-09-27 16:39:04 +03:00
|
|
|
<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 ${
|
|
|
|
shouldDisplayUploadCard ? "bg-gray-100" : "bg-white"
|
|
|
|
}`}
|
|
|
|
>
|
2023-09-26 19:41:02 +03:00
|
|
|
<div className="flex flex-1 flex-col overflow-y-auto">
|
|
|
|
<ChatDialogueArea />
|
|
|
|
</div>
|
2023-09-27 16:39:04 +03:00
|
|
|
<ActionsBar
|
|
|
|
setShouldDisplayUploadCard={setShouldDisplayUploadCard}
|
|
|
|
shouldDisplayUploadCard={shouldDisplayUploadCard}
|
|
|
|
/>
|
2023-08-11 11:06:20 +03:00
|
|
|
</div>
|
2023-09-26 19:41:02 +03:00
|
|
|
</section>
|
|
|
|
</main>
|
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;
|