quivr/frontend/app/layout.tsx
Matthieu Jacq 7e88032dc9
feat: new homepage header (#1382)
## Relates to

Epic: #1232 
Issue: #1377 

## 🚩 Feature flag

Use in growthbook the flag: `new-homepage-activated` (boolean)

## 📷 Screenshots

### 🖥️ Desktop

<img width="1059" alt="image"
src="https://github.com/StanGirard/quivr/assets/67386567/e0bae17a-bb94-4ba8-8dc3-a79d18f5d933">

### 📱 Mobile

<img width="377" alt="image"
src="https://github.com/StanGirard/quivr/assets/67386567/af8398dc-d9df-4034-a329-49aae3b2bf45">

<img width="375" alt="image"
src="https://github.com/StanGirard/quivr/assets/67386567/c5d53051-939e-49df-9c0a-212eff576b34">

---------

Co-authored-by: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com>
2023-10-11 18:36:16 +02:00

57 lines
1.6 KiB
TypeScript

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";
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}`}
>
<FeatureFlagsProvider>
<ToastProvider>
<SupabaseProvider session={session}>
<BrainProvider>
<App>{children}</App>
</BrainProvider>
</SupabaseProvider>
</ToastProvider>
<VercelAnalytics />
</FeatureFlagsProvider>
</body>
</html>
);
};
export default RootLayout;