mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-17 07:31:42 +03:00
315411facd
* style(chat and brains dropdown): remove blank scrollbars and use predefined components * style(chat): use custom scrollbar style by using scrollbar class
31 lines
700 B
TypeScript
31 lines
700 B
TypeScript
"use client";
|
|
import { redirect } from "next/navigation";
|
|
import { ReactNode } from "react";
|
|
|
|
import { ChatsProvider } from "@/lib/context/ChatsProvider/chats-provider";
|
|
import { useSupabase } from "@/lib/context/SupabaseProvider";
|
|
|
|
import { ChatsList } from "./components";
|
|
|
|
interface LayoutProps {
|
|
children?: ReactNode;
|
|
}
|
|
|
|
const Layout = ({ children }: LayoutProps): JSX.Element => {
|
|
const { session } = useSupabase();
|
|
if (session === null) {
|
|
redirect("/login");
|
|
}
|
|
|
|
return (
|
|
<ChatsProvider>
|
|
<div className="relative h-full w-full flex justify-stretch items-stretch">
|
|
<ChatsList />
|
|
{children}
|
|
</div>
|
|
</ChatsProvider>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|