quivr/frontend/app/chat/layout.tsx
Mamadou DICKO 2226eef06b
feat(chatPage): update ui add new feed component (#1275)
* feat(brains): remove unrelevent buttons on management page

* feat: improve feed input ux

* feat: update brain knowledge context add knowledge to feed logic

* feat: allow to drop files everywhere in the chat section

* style: add slide in effect when opening feed card

* test(chatPage): fix failing tests
2023-09-28 11:29:55 +02:00

37 lines
911 B
TypeScript

"use client";
import { ReactNode } from "react";
import { ChatProvider, KnowledgeProvider } from "@/lib/context";
import { ChatsProvider } from "@/lib/context/ChatsProvider/chats-provider";
import { useSupabase } from "@/lib/context/SupabaseProvider";
import { redirectToLogin } from "@/lib/router/redirectToLogin";
import { ChatsList } from "./components/ChatsList";
interface LayoutProps {
children?: ReactNode;
}
const Layout = ({ children }: LayoutProps): JSX.Element => {
const { session } = useSupabase();
if (session === null) {
redirectToLogin();
}
return (
<KnowledgeProvider>
<ChatsProvider>
<ChatProvider>
<div className="relative h-full w-full flex justify-stretch items-stretch">
<ChatsList />
{children}
</div>
</ChatProvider>
</ChatsProvider>
</KnowledgeProvider>
);
};
export default Layout;