quivr/frontend/app/brains-management/layout.tsx
Mamadou DICKO cf376fb59f
Brain management 1 (#752)
* feat: add brain management button

* feat: add brains list

* feat: add brain search bar

* feat: sort brain list by name

* refactor: update brains management page structure

* feat(BrainManagement): add new brain button

* feat: update import links
2023-07-24 14:17:21 +02:00

28 lines
606 B
TypeScript

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