quivr/frontend/app/layout.tsx
Aditya Nandan 57f9ef6170
Sticky - chat list, navbar, chat input (#295)
* feat: sticky navbar and sticky chatlist

* fix: remove unnecessary top padding

* style(chat): sticky chat input

* style(footer): increase vertical padding

* style(chat): sticky new chat button

* fix(chat): minor fixes

* fix(chat): center ChatMessages

* fix(chat): screen height chatlist
2023-06-11 10:44:23 +02:00

53 lines
1.6 KiB
TypeScript

import { createServerComponentSupabaseClient } from "@supabase/auth-helpers-nextjs";
import { Analytics } from "@vercel/analytics/react";
import { Inter } from "next/font/google";
import { cookies, headers } from "next/headers";
import { BrainConfigProvider } from "../lib/context/BrainConfigProvider/brain-config-provider";
import Footer from "./components/Footer";
import { NavBar } from "./components/NavBar";
import { ToastProvider } from "./components/ui/Toast";
import "./globals.css";
import SupabaseProvider from "./supabase-provider";
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.",
};
export default async function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
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}`}
>
<ToastProvider>
<SupabaseProvider session={session}>
<BrainConfigProvider>
<NavBar />
<div className="flex-1">{children}</div>
<Footer />
</BrainConfigProvider>
</SupabaseProvider>
</ToastProvider>
<Analytics />
</body>
</html>
);
}