mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
85f89b4df1
* feat(signup): add sign in page link * feat(upload): improve ui * ui(header): add logout button * feat(login): add redirection for logged user
48 lines
1.3 KiB
TypeScript
48 lines
1.3 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 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 dark:bg-black dark:text-white min-h-screen w-full ${inter.className}`}
|
|
>
|
|
<ToastProvider>
|
|
<SupabaseProvider session={session}>
|
|
<NavBar />
|
|
{children}
|
|
</SupabaseProvider>
|
|
</ToastProvider>
|
|
<Analytics />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|