mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-19 00:22:14 +03:00
d2b4ef4aff
* ✨ get all knowledge utils * ✨ add remove knowledge and update router * ✨ new knowledge provider * 🚨 remove eslint -disable * ✨ new useKnowledgeApi * ✨ set up KnowledgeItem * ✨ add KnowledgeTable component in knowledge tab * 🔥 remove DocumentData replaced by KnowledgeItem * 🐛 fix weird characters instead of '/' * 💄 truncate knowledge name * ✨ add DownloadUploadedKnowledge component * ⚰️ unused code * 🏷️ introduce UploadedKnowledge and CrawledKnowledge types * 💄 remove thread * 💄 bin for delete knowledge * 🌐 update wording for knowledge tab * 🔇 remove logs and comments
29 lines
696 B
TypeScript
29 lines
696 B
TypeScript
"use client";
|
|
import { ReactNode } from "react";
|
|
|
|
import { KnowledgeProvider } from "@/lib/context";
|
|
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 />
|
|
<KnowledgeProvider>{children}</KnowledgeProvider>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|