quivr/frontend/app/layout.tsx
Stan Girard b76262c4f0
Fix a bunch of issues (#442)
* fix(tokens): overflow

* fix(chat): fixed deletion error of the chat

#441

* fix(default-brain): autoset default brain when on upload page

* fix(promptengineering): changed prompt a bit

* feat(growthbook): removed

* docs(readme): updated
2023-07-01 17:22:28 +02:00

61 lines
1.8 KiB
TypeScript

import { createServerComponentSupabaseClient } from "@supabase/auth-helpers-nextjs";
import { Analytics } from "@vercel/analytics/react";
import { Inter } from "next/font/google";
import { cookies, headers } from "next/headers";
import Footer from "@/lib/components/Footer";
import { NavBar } from "@/lib/components/NavBar";
import { TrackingWrapper } from "@/lib/components/TrackingWrapper";
import { ToastProvider } from "@/lib/components/ui/Toast";
import { BrainProvider } from "@/lib/context";
import { BrainConfigProvider } from "@/lib/context/BrainConfigProvider/brain-config-provider";
import { SupabaseProvider } from "@/lib/context/SupabaseProvider";
import "./globals.css";
const inter = Inter({ subsets: ["latin"] });
export const metadata = {
title: "Quivr - Get a Second Brain with Generative AI",
description:
"Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
};
const RootLayout = async ({
children,
}: {
children: React.ReactNode;
}): Promise<JSX.Element> => {
const supabase = createServerComponentSupabaseClient({
headers,
cookies,
});
const {
data: { session },
} = await supabase.auth.getSession();
return (
<html lang="en">
<body
className={`bg-white text-black min-h-screen flex flex-col dark:bg-black dark:text-white w-full ${inter.className}`}
>
<ToastProvider>
<SupabaseProvider session={session}>
<BrainConfigProvider>
<BrainProvider>
<TrackingWrapper />
<NavBar />
<div className="flex-1">{children}</div>
<Footer />
</BrainProvider>
</BrainConfigProvider>
</SupabaseProvider>
</ToastProvider>
<Analytics />
</body>
</html>
);
};
export default RootLayout;