-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tsx
38 lines (34 loc) · 1.09 KB
/
layout.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { cn, constructMetadata } from "@/lib/utils";
import Navbar from "@/components/Navbar";
import Providers from "@/components/Providers";
import { Toaster } from "sonner";
import Footer from "@/components/Footer";
const inter = Inter({ subsets: ["latin"] });
export const metadata = constructMetadata();
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body
className={cn("relative h-full font-sans antialiased", inter.className)}
>
<main className="relative flex flex-col min-h-screen">
{/* Make trpc and react-query accessible to the whole app through layout.tsx */}
<Providers>
<Navbar />
{/* https://tailwindcss.com/docs/flex */}
<div className="flex-grow flex-1">{children}</div>
<Footer />
</Providers>
</main>
<Toaster position="top-center" richColors />
</body>
</html>
);
}