forked from nextjs/saas-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tsx
35 lines (30 loc) · 875 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
33
34
35
import './globals.css';
import type { Metadata, Viewport } from 'next';
import { Manrope } from 'next/font/google';
import { UserProvider } from '@/lib/auth';
import { getUser } from '@/lib/db/queries';
export const metadata: Metadata = {
title: 'Next.js SaaS Starter',
description: 'Get started quickly with Next.js, Postgres, and Stripe.',
};
export const viewport: Viewport = {
maximumScale: 1,
};
const manrope = Manrope({ subsets: ['latin'] });
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
let userPromise = getUser();
return (
<html
lang="en"
className={`bg-white dark:bg-gray-950 text-black dark:text-white ${manrope.className}`}
>
<body className="min-h-[100dvh] bg-gray-50">
<UserProvider userPromise={userPromise}>{children}</UserProvider>
</body>
</html>
);
}