mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-16 10:02:30 +03:00
26 lines
562 B
TypeScript
26 lines
562 B
TypeScript
|
"use client";
|
||
|
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 (
|
||
|
<div className="relative h-full w-full flex pt-20">
|
||
|
<div className="h-full">
|
||
|
<ChatsList />
|
||
|
</div>
|
||
|
{children}
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default Layout;
|