mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-16 18:52:12 +03:00
e885574d1e
Issue: https://github.com/StanGirard/quivr/issues/1889 Demo: https://github.com/StanGirard/quivr/assets/63923024/f9853b7e-e358-4c98-9281-4b0752a29632
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import { createServerComponentSupabaseClient } from "@supabase/auth-helpers-nextjs";
|
|
import { Analytics as VercelAnalytics } from "@vercel/analytics/react";
|
|
import { Outfit } from "next/font/google";
|
|
import { cookies, headers } from "next/headers";
|
|
|
|
import { ToastProvider } from "@/lib/components/ui/Toast";
|
|
import { FeatureFlagsProvider } from "@/lib/context";
|
|
import { SupabaseProvider } from "@/lib/context/SupabaseProvider";
|
|
|
|
import { App } from "./App";
|
|
import "./globals.css";
|
|
|
|
const inter = Outfit({ 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 h-screen flex flex-col dark:bg-black dark:text-white w-full ${inter.className}`}
|
|
>
|
|
<FeatureFlagsProvider>
|
|
<ToastProvider>
|
|
<SupabaseProvider session={session}>
|
|
<App>{children}</App>
|
|
</SupabaseProvider>
|
|
</ToastProvider>
|
|
<VercelAnalytics />
|
|
</FeatureFlagsProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
};
|
|
|
|
export default RootLayout;
|