mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-21 02:11:35 +03:00
b64fc044c4
* 🚧 🌐 knowledge traductions * 🔥 replace useKnowledge hook * ✨ AddKnowledge in knowledge tab * 🚧 extract feedBrain in chat hook * ♻️ use feedBrain method as a prop in KnowledgeToFeedInput * ✨ custom feedBrain for chat and brain management * ✨ add loader when deleting * 🚑 remove chat after auto creation for each feed action * 🚚 rename KnowledgeProvider into KnowledgeToFeedProvider
28 lines
606 B
TypeScript
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;
|