|
1 | 1 | import { ReactElement, ReactNode } from "react" |
2 | | -import { Metadata } from "next" |
3 | | -import GoogleAnalytics from "@/app/ga" |
4 | | - |
5 | | -// @ts-expect-error: we want to import the same version as Nextra for the main page |
6 | | -import { ThemeProvider } from "next-themes" |
7 | 2 |
|
8 | 3 | import { Footer } from "@/components/footer" |
9 | | -import { NewFontsStyleTag } from "../fonts" |
10 | 4 | import { Navbar } from "@/components/navbar/navbar" |
11 | 5 | import { topLevelNavbarItems } from "@/components/navbar/top-level-items" |
12 | | -import { MenuProvider } from "../(main)/menu-provider" |
13 | | - |
14 | | -import "../../globals.css" |
15 | | -import "../colors.css" |
16 | | - |
17 | | -export const metadata: Metadata = { |
18 | | - twitter: { |
19 | | - site: "@graphql", |
20 | | - card: "summary_large_image", |
21 | | - }, |
22 | | - metadataBase: new URL("https://graphql.org"), |
23 | | - keywords: ["GraphQL"], |
24 | | - applicationName: "GraphQL.ORG", |
25 | | - title: { |
26 | | - absolute: "", |
27 | | - template: "%s | GraphQL", |
28 | | - }, |
29 | | -} |
30 | 6 |
|
31 | | -export default function RootLayout({ |
| 7 | +export default function MainLayout({ |
32 | 8 | children, |
33 | 9 | }: { |
34 | 10 | children: ReactNode |
35 | 11 | }): ReactElement { |
36 | 12 | return ( |
37 | | - <html |
38 | | - lang="en" |
39 | | - className="scroll-smooth" |
40 | | - // ThemeProvider adds a `light`/`dark` class |
41 | | - suppressHydrationWarning |
42 | | - > |
43 | | - <head> |
44 | | - <style>{`html { scroll-padding-top: 5rem }`}</style> |
45 | | - </head> |
46 | | - <body className="bg-neu-0"> |
47 | | - <GoogleAnalytics /> |
48 | | - <NewFontsStyleTag /> |
49 | | - <ThemeProvider attribute="class"> |
50 | | - <MenuProvider> |
51 | | - <Navbar items={topLevelNavbarItems} /> |
52 | | - <div className="isolate bg-neu-0 text-neu-900 antialiased"> |
53 | | - <h1 style={{ fontSize: 200 }}>MAIN LAYOUT</h1> |
54 | | - {children} |
55 | | - </div> |
56 | | - <Footer /> |
57 | | - </MenuProvider> |
58 | | - </ThemeProvider> |
59 | | - </body> |
60 | | - </html> |
| 13 | + <> |
| 14 | + <Navbar items={topLevelNavbarItems} /> |
| 15 | + {children} |
| 16 | + <Footer /> |
| 17 | + </> |
61 | 18 | ) |
62 | 19 | } |
0 commit comments