-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathlayout.tsx
89 lines (82 loc) · 2.01 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import "@/styles/globals.css"
import type { Metadata, Viewport } from "next"
import { Inter } from "next/font/google"
import { siteConfig } from "@/config/site"
import { cn } from "@/lib/utils"
import { ThemeProvider } from "@/components/theme-provider"
const inter = Inter({ subsets: ["latin"] })
interface RootLayoutProps {
children: React.ReactNode
}
export const metadata: Metadata = {
metadataBase: new URL(siteConfig.url.base),
title: {
default: siteConfig.name,
template: `%s | ${siteConfig.name}`,
},
description: siteConfig.description,
keywords: siteConfig.keywords,
authors: [
{
name: siteConfig.author,
url: siteConfig.url.author,
},
],
creator: siteConfig.author,
openGraph: {
type: "website",
locale: "en_US",
url: siteConfig.url.base,
title: siteConfig.name,
description: siteConfig.description,
siteName: siteConfig.name,
images: [
{
url: siteConfig.ogImage,
width: 1200,
height: 630,
alt: siteConfig.name,
},
],
},
twitter: {
card: "summary_large_image",
title: siteConfig.name,
description: siteConfig.description,
images: [siteConfig.ogImage],
creator: "@_rdev7",
},
icons: {
icon: "/favicon.ico",
},
}
export const viewport: Viewport = {
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "white" },
{ media: "(prefers-color-scheme: dark)", color: "black" },
],
}
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<body
className={cn(
"min-h-screen bg-background antialiased",
inter.className
)}
>
<ThemeProvider
attribute="class"
defaultTheme="white"
enableSystem
disableTransitionOnChange
>
<div vaul-drawer-wrapper="" className="bg-background">
{children}
</div>
</ThemeProvider>
</body>
</html>
)
}