forked from Kiranism/next-shadcn-dashboard-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tsx
32 lines (29 loc) · 857 Bytes
/
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
import Providers from "@/components/layout/providers";
import { Toaster } from "@/components/ui/toaster";
import "@uploadthing/react/styles.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { getServerSession } from "next-auth";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Next Shadcn",
description: "Basic dashboard with Next.js and Shadcn",
};
export default async function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
const session = await getServerSession();
return (
<html lang="en" suppressHydrationWarning>
<body className={`${inter.className} overflow-hidden`}>
<Providers session={session}>
<Toaster />
{children}
</Providers>
</body>
</html>
);
}