-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathlayout.tsx
More file actions
56 lines (51 loc) · 1.35 KB
/
layout.tsx
File metadata and controls
56 lines (51 loc) · 1.35 KB
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
import { ReactElement, ReactNode } from "react"
import type { Metadata } from "next"
import GoogleAnalytics from "@/app/ga"
// @ts-expect-error: we want to import the same version as Nextra for the main page
import { ThemeProvider } from "next-themes"
import { NewFontsStyleTag } from "./fonts"
import { MenuProvider } from "./(main)/menu-provider"
import "@/globals.css"
import "@/app/colors.css"
export const metadata: Metadata = {
twitter: {
site: "@graphql",
card: "summary_large_image",
},
metadataBase: new URL("https://graphql.org"),
keywords: ["GraphQL"],
applicationName: "GraphQL.ORG",
title: {
absolute: "",
template: "%s | GraphQL",
},
}
export default function RootLayout({
children,
}: {
children: ReactNode
}): ReactElement {
return (
<html
lang="en"
className="scroll-smooth"
// ThemeProvider adds a `light`/`dark` class
suppressHydrationWarning
>
<head>
<style>{`html { scroll-padding-top: 5rem }`}</style>
</head>
<body className="bg-neu-0">
<GoogleAnalytics />
<NewFontsStyleTag />
<ThemeProvider attribute="class">
<MenuProvider>
<div className="isolate bg-neu-0 text-neu-900 antialiased">
{children}
</div>
</MenuProvider>
</ThemeProvider>
</body>
</html>
)
}