-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathlayout.tsx
More file actions
206 lines (189 loc) · 6.13 KB
/
layout.tsx
File metadata and controls
206 lines (189 loc) · 6.13 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/* eslint-env node */
import { Footer, Layout, Navbar } from 'nextra-theme-docs'
import { Banner, Head } from 'nextra/components'
import { getPageMap } from 'nextra/page-map'
import './globals.css'
import { CodeXml } from 'lucide-react'
import ReactQueryProvider from '@/docs-components/ReactQueryProvider'
import { Application, PlayCanvasCanvas } from '@playcanvas/react'
import { FC, ReactNode } from 'react'
export const { viewport } = Head
export const metadata = {
metadataBase: new URL('https://playcanvas.com'),
title: {
template: '%s - PlayCanvas React'
},
description: 'PlayCanvas React: Full featured 3D for React',
applicationName: 'PlayCanvas React',
generator: 'Next.js',
appleWebApp: {
title: 'PlayCanvas React'
},
other: {
'msapplication-TileImage': '/ms-icon-144x144.png',
'msapplication-TileColor': '#fff'
},
twitter: {
site: 'https://playcanvas.com'
}
}
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const navbar = (
<Navbar
logo={
<div className="flex items-center gap-2">
<div className="rounded-full bg-zinc-800 p-2 inline-block">
<CodeXml size={24} strokeWidth={2} />
</div>
<span style={{ opacity: '60%' }}>Simple 3D for the Web</span>
</div>
}
// PlayCanvas discord server
chatLink="https://discord.gg/hEM84NMkRv"
// PlayCanvas GitHub
projectLink="https://github.com/playcanvas/react"
/>
)
return (
<html lang="en" dir="ltr" suppressHydrationWarning>
<Head faviconGlyph="✦" />
<body>
{/* <Layout
footer={<Footer />}
navbar={navbar}
pageMap={await getPageMap()}
> */}
<ReactQueryProvider>
{/* {className='hover:cursor-grab active:cursor-grabbing w-full'} */}
{children}
</ReactQueryProvider>
{/* </Layout> */}
</body>
</html>
)
}
// // // const RootLayout: FC<{ children: ReactNode }> = async ({ children }) => {
// // // return (
// // // <html lang="en" dir="ltr">
// // // <Head faviconGlyph="✦" />
// // // <body style={{ margin: 0 }}>
// // // <div style={{ display: 'flex' }}>
// // // {/* <ReactQueryProvider> */}
// // // {children}
// // // {/* </ReactQueryProvider> */}
// // // </div>
// // // <Footer />
// // // </body>
// // // </html>
// // // )
// // // }
// // // export default function MyLayout({ children, ...props }) {
// // // return (
// // // <html lang="en">
// // // <body>
// // // <Layout
// // // navbar={}
// // // sidebar={{ autoCollapse: true }}
// // // docsRepositoryBase="https://github.com/shuding/nextra/tree/main/docs"
// // // >
// // // {children}
// // // </Layout>
// // // </body>
// // // </html>
// // // )
// // // }
// // // export default RootLayout
// import { Footer, Layout, Navbar } from 'nextra-theme-docs'
// import { Banner, Head } from 'nextra/components'
// import { getPageMap } from 'nextra/page-map'
// import 'nextra-theme-docs/style.css'
// export const metadata = {
// // Define your metadata here
// // For more information on metadata API, see: https://nextjs.org/docs/app/building-your-application/optimizing/metadata
// }
// const banner = <Banner storageKey="some-key">Nextra 4.0 is released 🎉</Banner>
// const navbar = (
// <Navbar
// logo={<b>Nextra</b>}
// // ... Your additional navbar options
// />
// )
// const footer = <Footer>MIT {new Date().getFullYear()} © Nextra.</Footer>
// export default async function RootLayout({ children }) {
// const pageMap = await getPageMap();
// console.log(pageMap)
// return (
// <html
// // Not required, but good for SEO
// lang="en"
// // Required to be set
// dir="ltr"
// // Suggested by `next-themes` package https://github.com/pacocoursey/next-themes#with-app
// suppressHydrationWarning
// >
// <Head
// // ... Your additional head options
// >
// {/* Your additional tags should be passed as `children` of `<Head>` element */}
// </Head>
// <body>
// <Layout
// banner={banner}
// navbar={navbar}
// pageMap={pageMap}
// docsRepositoryBase="https://github.com/shuding/nextra/tree/main/docs"
// footer={footer}
// // ... Your additional layout options
// >
// {children}
// </Layout>
// </body>
// </html>
// )
// }
// import { Footer, Layout, Navbar } from 'nextra-theme-docs'
// import { Banner, Head } from 'nextra/components'
// import { getPageMap } from 'nextra/page-map'
// import 'nextra-theme-docs/style.css'
// export const metadata = {
// // Define your metadata here
// // For more information on metadata API, see: https://nextjs.org/docs/app/building-your-application/optimizing/metadata
// }
// const banner = <Banner storageKey="some-key">Nextra 4.0 is released 🎉</Banner>
// const navbar = (
// <Navbar
// logo={<b>Nextra</b>}
// // ... Your additional navbar options
// />
// )
// const footer = <Footer>MIT {new Date().getFullYear()} © Nextra.</Footer>
// export default async function RootLayout({ children }) {
// return (
// <html
// // Not required, but good for SEO
// lang="en"
// // Required to be set
// dir="ltr"
// // Suggested by `next-themes` package https://github.com/pacocoursey/next-themes#with-app
// suppressHydrationWarning
// >
// <Head
// // ... Your additional head options
// >
// {/* Your additional tags should be passed as `children` of `<Head>` element */}
// </Head>
// <body>
// <Layout
// banner={banner}
// navbar={navbar}
// pageMap={await getPageMap()}
// docsRepositoryBase="https://github.com/shuding/nextra/tree/main/docs"
// footer={footer}
// // ... Your additional layout options
// >
// {children}
// </Layout>
// </body>
// </html>
// )
// }