mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
1d7bc8a5bc
* remove duplicate import * 🚧 add new linter configuration * 🧑💻 add and run prettier * 🐛 add babel parser for linter * 🧑💻 add lint-fix command * 🚨 use lint-fix * 🚨 remove 'FC' as a type. Use const and JSX.Element * 🚨 enforce arrow function rule from linter * 🔥 delete unused file * 🚨 adding /* eslint-disable */ in failing files * 💩 add ts-expect-error to Victory components
31 lines
664 B
TypeScript
31 lines
664 B
TypeScript
"use client";
|
|
import { redirect } from "next/navigation";
|
|
import { ReactNode } from "react";
|
|
|
|
import { ChatsProvider } from "@/lib/context/ChatsProvider/chats-provider";
|
|
|
|
import { ChatsList } from "./components";
|
|
import { useSupabase } from "../supabase-provider";
|
|
|
|
interface LayoutProps {
|
|
children?: ReactNode;
|
|
}
|
|
|
|
const Layout = ({ children }: LayoutProps): JSX.Element => {
|
|
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;
|