mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-16 10:02:30 +03:00
f4aa22417f
* 🚚 move footer component * 🚚 move navbar component * 🚚 move ui components * 🚚 move browser tab icon to public folder * 🚚 move Chat Provider * 🚚 move hooks to lib * 🚚 move helpers to lib * 🚚 move types to lib
27 lines
647 B
TypeScript
27 lines
647 B
TypeScript
"use client";
|
|
import { ChatsProvider } from "@/lib/context/ChatsProvider/chats-provider";
|
|
import { redirect } from "next/navigation";
|
|
import { FC, ReactNode } from "react";
|
|
import { useSupabase } from "../supabase-provider";
|
|
import { ChatsList } from "./components";
|
|
|
|
interface LayoutProps {
|
|
children?: ReactNode;
|
|
}
|
|
|
|
const Layout: FC<LayoutProps> = ({ children }) => {
|
|
const { session } = useSupabase();
|
|
if (!session) redirect("/login");
|
|
|
|
return (
|
|
<ChatsProvider>
|
|
<div className="relative h-full w-full flex items-start">
|
|
<ChatsList />
|
|
{children}
|
|
</div>
|
|
</ChatsProvider>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|