mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-26 12:55:01 +03:00
d7d1a0155b
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
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";
|
|
import "./globals.css";
|
|
import styles from "./layout.module.scss";
|
|
|
|
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={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>
|
|
</html>
|
|
);
|
|
};
|
|
|
|
export default RootLayout;
|