1
1
mirror of https://github.com/StanGirard/quivr.git synced 2024-12-28 13:51:57 +03:00
quivr/frontend/app/layout.tsx

59 lines
1.7 KiB
TypeScript
Raw Normal View History

import { createServerComponentSupabaseClient } from "@supabase/auth-helpers-nextjs";
import { Analytics as VercelAnalytics } from "@vercel/analytics/react";
import { Inter } from "next/font/google";
import { cookies, headers } from "next/headers";
import { ToastProvider } from "@/lib/components/ui/Toast";
import { FeatureFlagsProvider } from "@/lib/context";
import { BrainProvider } from "@/lib/context/BrainProvider";
import { SupabaseProvider } from "@/lib/context/SupabaseProvider";
import { App } from "./App";
2023-09-22 19:15:28 +03:00
import "./globals.css";
2023-05-18 02:22:13 +03:00
const inter = Inter({ subsets: ["latin"] });
2023-05-18 02:22:13 +03:00
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.",
};
2023-05-18 02:22:13 +03:00
const RootLayout = async ({
children,
}: {
children: React.ReactNode;
}): Promise<JSX.Element> => {
const supabase = createServerComponentSupabaseClient({
headers,
cookies,
});
const {
data: { session },
} = await supabase.auth.getSession();
2023-05-18 02:22:13 +03:00
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}`}
>
<FeatureFlagsProvider>
<ToastProvider>
<SupabaseProvider session={session}>
<BrainProvider>
<App>
<div className="flex-1">{children}</div>
</App>
</BrainProvider>
</SupabaseProvider>
</ToastProvider>
<VercelAnalytics />
</FeatureFlagsProvider>
</body>
2023-05-18 02:22:13 +03:00
</html>
);
};
export default RootLayout;