quivr/frontend/app/layout.tsx

50 lines
1.3 KiB
TypeScript
Raw Normal View History

import { createServerComponentSupabaseClient } from "@supabase/auth-helpers-nextjs";
import { Analytics as VercelAnalytics } from "@vercel/analytics/react";
import { cookies, headers } from "next/headers";
import { ToastProvider } from "@/lib/components/ui/Toast";
import { SupabaseProvider } from "@/lib/context/SupabaseProvider";
import { App } from "./App";
2023-09-22 19:15:28 +03:00
import "./globals.css";
import styles from "./layout.module.scss";
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={styles.body}
// className={`bg-white text-black h-screen flex flex-col dark:bg-black dark:text-white w-full ${inter.className}`}
>
<ToastProvider>
<SupabaseProvider session={session}>
<App>{children}</App>
</SupabaseProvider>
</ToastProvider>
<VercelAnalytics />
</body>
2023-05-18 02:22:13 +03:00
</html>
);
};
export default RootLayout;